3 ms·
I agree with others who have said this document isn't biased. I think it has a different problem: balance fallacy[1]. It's putting two opinions next to each oth
by copsarebastards 12y ago
I agree with others who have said this document isn't biased. I think it has a different problem: balance fallacy[1]. It's putting two opinions next to each other as if they were both equally worth considering.
If, in an interview, someone wrote Java code using ArrayList instead of ArrayList<T> or C# code using List instead of List<T>, I wouldn't hire that person. If you write code in Java or C# that doesn't use generics, you're giving up type safety, performance, readability, reusability... the list goes on. Your code is bad and you should feel bad.
Not having generics in Go means that your code will be less type-safe, less performant, less readable, less reusable, etc. than comparable code in Java or C#.
I'll go one step further and say it was short-sighted for the Go developers to implement data structures without generics in the first place. Yes, it makes it harder to implement the language initially, but that's an up-front investment of time that will prevent millions of lines of bad code from being written if the language gains traction. Users who really insist on shooting themselves in the foot can do GenericType<Object> and make their bad decision explicit. It's just bad design for a modern statically-typed language not to include generics (or a comparably powerful type abstraction).
[1] http://rationalwiki.org/wiki/Balance_fallacy http://rationalwiki.org/wiki/Balance_fallacy