3 ms·
I thought the debate was about polymorphism. It's apparently not worth including because...? It's not already in the language spec? Because the people who advoc
by m0th87 12y ago
I thought the debate was about polymorphism. It's apparently not worth including because...? It's not already in the language spec? Because the people who advocate it are using the wrong tool? Surely there's a better argument than this.
- tptacek 12y agoLack of polymorphism isn't even close to the most common objection to Golang. The most common objection is the lack of generics, which make it tricky to write reusable container libraries. Golang comes pretty close to flat-out rejecting object orientation. It's only barely more object-friendly than C is. If you're the kind of programmer that wants to model a problem domain or build code with the Smalltalky feel that Gang of Four patterns give Java and C++, you will also hate Golang. Generics might happen in the future (the more Golang I write, the less excited I am at the prospect), but a richer object model seems very unlikely. If you want to hang your argument on polymorphism rather than generics (I applied the principle of charity and assumed that's what you meant), the argument gets less valid, not more.
- m0th87 12y agoApologies, polymorphism is a loaded term that could mean different things depending on your background. I mean parametric polymorphism, i.e. generics. What makes you unexcited about them?
- tptacek 12y agoI surely see the value, but I'm also convinced by the idea that they will complicate the language, and, in practice, after a year or so writing fairly serious Golang programs (I wrote the emulator and debugger backend for Microcorruption in Golang, for instance, along with a pretty complicated web fuzzer) I haven't missed them.