3 ms·
> It is exactly the same kind of polymorphism that languages like Java and C# had before they adopted generics. That's false. Go provides a smattering of bless
by burntsushi 10y ago
> It is exactly the same kind of polymorphism that languages like Java and C# had before they adopted generics.
That's false. Go provides a smattering of blessed polymorphic types (slices, maps, chans, pointers) and functions (len, append, delete, chan send, chan recv) that go a long way. They are horrifying to civilized PL enthusiasts, but they cover a lot ground.
As I said in one of my sibling comments, navel gazing isn't going to get you anywhere. And Go isn't the only statically typed language without generics. C has that designation as well.
- int_19h 10y agoC is one of those things that hasn't meaningfully changed in decades now. So yes, technically it is a mainstream language without generics (and many other things) - but I don't think that's a viable role model. The only reason why C is what it is, is because of all the legacy code written in it.
- burntsushi 10y agoWho said anything about C being a role model? I think your chosen language is somewhat misleading, so it's worth pointing out.