Re:Maybe adding generics to Go is about syntax after all
by wbl on Tuesday September 04, 2018 @11:32AM
(#17909713)
Why not adopt standard ML's polymorphism semantics? Is there some type theory issue I don't know about preventing that?
[ Parent
| on HN ]
Re:Maybe adding generics to Go is about syntax after all
by fusiongyro on Tuesday September 04, 2018 @12:53PM
(#17910522)
I wish the world adopted ML's modules and functors. Especially higher-order functors, which are kind of an extension of the standard.
But I think Go is more worried about compiler performance, so if there are significant complexities in the surface syntax of generics or in their downstream consequences, it will be an impediment there. I think the people behind Go consider most type theory to be an impediment to productivity and would rather accept something simple with shortcomings they understand than try to do it "right." I think this is a perfect example of Unix's "worse is better" philosophy. Whether we agree with it or not is another question.
Re:Maybe adding generics to Go is about syntax after all
by danharaj on Tuesday September 04, 2018 @11:57AM
(#17909942)
I don't know much about Go. Does it have subtyping? Mixing polymorphism and subtyping isn't obvious. Stephen Dolan's thesis on algebraic subtyping [0] is the first really satisfactory answer, all previous ones having significant drawbacks, but it's only 2 years old, untested in a production language.
Considering how conservative, bordering on reactionary, the philosophy of Go seems, I think it's politically untenable.
Re:Maybe adding generics to Go is about syntax after all
by atombender on Tuesday September 04, 2018 @07:07PM
(#17913647)
Go does not have subtyping. Its type system is sufficiently rudimentary that steering it towards ML would just be just too extreme at this point.