News for hackers. Stuff that matters.
Re:Writing a Compiler in Go by jerf on Tuesday May 03, 2016 @02:31PM (#11623077)
It bears certain similarities to multiple dispatch, as if a case statement was an inlined multiple-dispatch function, but I'd say that much as objects can theoretically be implemented with closures and closures can theoretically be implemented with objects but I don't think they're best thought of as the "same thing", polymorphism and various dispatch techniques aren't really the same thing as pattern matching.

My real point here is use what you've got; trying to use object polymorphism in Haskell would be as big a mistake there as trying to naively jam pattern matching into Go. Stick to the native idioms as much as possible. While I agree that Go's native idioms are limiting compared to some other languages I also think a lot of people grossly overestimate the limitations.

Re:Writing a Compiler in Go by stcredzero on Tuesday May 03, 2016 @05:02PM (#11624220)
Everything in Smalltalk was pretty much polymorphism, lambdas, and reflection. I suspect that's why I like golang. (There are a few other tricks, but better not to go there unless you really know what you're doing.)
Re:Writing a Compiler in Go by coldtea on Tuesday May 03, 2016 @08:00PM (#11625216)
>Everything in Smalltalk was pretty much polymorphism, lambdas, and reflection. I suspect that's why I like golang.

Huh? While it has both, Go is as far from lambdas and reflection as you can go and still be modern language.