3 ms·
Once they add generics, I will stop laughing at the language, but still probably won't use it. There's very little if anything it adds over C# or modern Java.
by lostmsu 6y ago
Once they add generics, I will stop laughing at the language, but still probably won't use it. There's very little if anything it adds over C# or modern Java.
- geodel 6y agoTrue. I think really a lot of people who are clamoring for generics in Go would already be working with more productive languages. Generics is mainly for users who have committed to Go and new productive language features could possibly help them.
- coldtea 6y agoOn the other hand, programmers don't always pick which languages they get to work with. If I'm forced to use a language, it might as well have Generics than not...
- pjmlp 6y agoUntil Docker or Kubernetes fad doesn't go away, having to deal with Go is something that those of us that rather use C# or modern Java have to face, so it will help if the language catches up with modern times.
- pas 6y agoBut those large codebases will not be updated for some time. Or do you mean that at least new features could be written using generics?
- pjmlp 6y agoThe latter, as I always mention, platform languages always have the edge even if not as fancy as guest languages. In the context of Docker and k8s, Go is the platform language so to speak, and although there are extension points for other languages, one has less integration headaches when using Go as well.
- lkramer 6y agoAt the moment it has something very valuable those languages don't have: A lack of Generics. Once they add Generics it will just be competing with those languages on the same turf. It might not be for you, you may rely heavily on Generics in your daily work flow. If I need generics in my work, I reach for Rust or C++. But when I want to write an easily maintainable microservice that's not trying to reinvent the wheel or need some clever datastructure to handle the work, I reach for Go, since that is what it's good at (at the moment).
- rightbyte 6y agoHow is having generics/templates to reinvent the wheel? The one thing that put me off the most about using C for everything is lack of a common list/vector/map/set standard library for all types. Instead I reinvent the wheel in each project. Go cheats in this regard with compiler magic and that just pisses me off. Atleast you can in theory do printf in iso C.
- chartpath 6y agoHow is being compiled the same turf as running in a VM?