Hacker News new | ask | show | jobs
by hoodoof 3234 days ago
This may be the "computing industry sentence of the year", if they had an award for "sentence of the year", which I'm sure they don't. Whoever they are.

while nil is assigned to t2, when t2 is passed to factory it is “boxed” into an variable of type P; an interface. Thus, thing.P does not equal nil because while the value of P was nil, its concrete type was *T.

2 comments

This is required to support one of the most peculiar features I've ever seen--method dispatch on the concrete type of object that isn't there.
This is where language design morphs into philosophy...
"Go should stay simple, it does not need generics."