4 ms·
> Questions such as yours makes me realize that a lot of go developers don't even understand what is the purpose of generic programming. While this sounds a bi
by tazjin 9y ago
> Questions such as yours makes me realize that a lot of go developers don't even understand what is the purpose of generic programming.
While this sounds a bit condescending I know exactly what you mean.
There seems to be some sort of "language barrier" (where the language is programming language concepts) between developers from different backgrounds.
Go is currently used in a lot of successful projects, so it gets new developers from lots of places and they are failing to communicate adequately about the language itself. I see three main groups (there may be more!):
a) People who come from C and other lower-level languages: They are introduced to memory-safety, keep a type system that they already know and are comfortable with and in addition get a polished, well-integrated toolchain.
b) People who come from Python, Ruby and other "untyped" scripting languages. These are introduced to native code (wow! fast!), a type system that isn't expressive - but sufficient (and more than they had before), and the same toolchain experience.
c) People who come from higher-level, safer languages including (but not limited to) Java, Haskell, C# and so on. These developers for the most part already had well-functioning toolchains, but they are "stepping down" to a language that is less expressive (okay, for Java-people YMMV greatly) and often end up frustrated.
Now you get conflicts when the c-people have discussions like this with the a/b-people and nobody is happy.
There's an old joke about this in the Haskell community: http://www.lispcast.com/img/typing.png http://www.lispcast.com/img/typing.png
- int_19h 9y agoI'm not really convinced that all (or even most) people from the b) category can be lumped together with a). I like both statically and dynamically typed languages, and it's precisely because I like the latter is why I demand the former to have sufficiently advanced type systems to let me avoid most of the verbosity normally associated with static typing. When I'm writing in C#, for example, if I'm working with a collection type - and it doesn't matter if it's from the standard library or a third-party package - the only place where I need to mention the type of elements is when I instantiate it. Then I can add and elements to it, and access them later, and it's a lot like Python - I don't have to worry about the type, it's just magically there, thanks to generics (and "var"). But get rid of generics, and now suddenly explicit types are all over the place.