News for hackers. Stuff that matters.
Re:Griping about Go by nemothekid on Thursday February 07, 2019 @06:09PM (#19109624)
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.

Re:Griping about Go by DaiPlusPlus on Thursday February 07, 2019 @06:47PM (#19109861)
> 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.

Re:Griping about Go by hombre_fatal on Thursday February 07, 2019 @07:13PM (#19110020)
Yeah, nullable types are one thing. Go's null interface is another:

https://play.golang.org/p/N_3BiUOkRJo

It's probably the first and last to have this quirk.