Hacker News new | ask | show | jobs
by leetrout 1663 days ago
> Go did not have generic types at the time so I excluded it immediately

I wonder how many people are missing out on Go for a feature they wouldnt miss 80-90% of the time?

3 comments

I’ll be honest. It kept me away from Go for far too long. Now, I really appreciate Go, and hope the new generics implementation doesn’t ruin the culture. I do wish Go had sum types, and that it didn’t have null. Those are my main gripes.
Generic code is written with D a lot more than I'd originally anticipated.
Oh I dont deny that at all. D is on my list of languages to try precisely because it is more powerful / flexible than Go (and thank you for making it).

Just surprises me how quickly people write it off. Horses for courses!

The only way you can be saying this is if you haven't experienced metaprogramming in D. C++ does not compare at all. Generics do not compare at all.

You can take D metaprogramming from my cold dead hands.

If you were in the authors shoes and you disliked C++ templates would you also have written off Go without trying it, though?

No argument on going from D to something else but to not know either and not even try Go is what surprises me.

Yeah I do much in C# and almost never use generics. And when I do it is almost always not what I want.

D has me fooled and I can't imagine Go choosing to go further in D's direction over C#. I feel sorry for them.

You almost never use List<T>? Dictionary<TKey, TValue>? IEnumerable<T>?
Those don't matter, because while you can't build your own in Go, the built in types provide the same functionality.
I was puzzled by strange linguistic ideas of go's designers. The reference to the English language can't justify go's syntax.
Do you have an example top of mind?
Array of bytes []byte being English, but byte array byte[] being not English.