3 ms·
Why not adopt standard ML's polymorphism semantics? Is there some type theory issue I don't know about preventing that?
by wbl 8y ago
Why not adopt standard ML's polymorphism semantics? Is there some type theory issue I don't know about preventing that?
- danharaj 8y agoI 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. [0] PDF: https://www.cl.cam.ac.uk/~sd601/thesis.pdf https://www.cl.cam.ac.uk/~sd601/thesis.pdf
- atombender 8y agoGo does not have subtyping. Its type system is sufficiently rudimentary that steering it towards ML would just be just too extreme at this point.
- fusiongyro 8y agoI 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.