News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by loopz on Monday February 03, 2020 @04:19PM (#22229226)
Golang maps returns the value type's zero value in case the key doesn't exist: https://blog.golang.org/go-maps-in-action

The idiomatic way here being that the zero value should be a sane default for that value. You are then free to create your own types ontop of that, but the defaults are often in the ballpark of where you want to be unless you have specific needs in your context.

There are no comments on this comment yet.