2 ms·
nil interfaces is one of the strangest things in language, and after learning Rust after using Go for years, I think not having Option types is the real wart in
by nemothekid 8y ago
nil interfaces is one of the strangest things in language, and after learning Rust after using Go for years, I think not having Option types is the real wart in the language.
I've never really cared about Generics, but having nullable types is a real mistake to me.
- DaiPlusPlus 8y ago> but having nullable types is a real mistake to me. Nullable types by themselves are fine, the language and the compiler just needs to make handling “is X null?” work the same way as option types do - or better yet: languages were a variable is only in scope if it is not null.
- deleted 8y ago[deleted]
- hombre_fatal 8y agoYeah, nullable types are one thing. Go's null interface is another: https://play.golang.org/p/N_3BiUOkRJo https://play.golang.org/p/N_3BiUOkRJo It's probably the first and last to have this quirk.