3 ms·
Nil values could be kind of tolerable if the language was always explicit about what is nillable and what is not. If you see something like "MyStruct" you can n
by kgeist 5y ago
Nil values could be kind of tolerable if the language was always explicit about what is nillable and what is not. If you see something like "MyStruct" you can never be sure if it's an interface (can be nil) or a value (cannot be nil).
- tptacek 5y agoI understand the ambiguity you're talking about here, but how often does this actually bite you in practice? There are other context cues that you're dealing with a struct and not an interface, and the nil-ness of a return value isn't how you idiomatically communicate success or failure, even for things like map lookups where it would be somewhat natural in a C API to do that.
- deleted 5y ago[deleted]