5 ms·
16% want generics and 17% love simplicity. So much for all those who claim generics remain overwhelming concern for Go developers.
by geodel 10y ago
16% want generics and 17% love simplicity.
So much for all those who claim generics remain overwhelming concern for Go developers.
- k__ 10y agoWhy not fork?
- geodel 10y agoyes, why not?
- monsieurbanana 10y agoYou really think a fork will help here? Can you explain a bit more how do you think a fork will work out?
- k__ 10y agoSo one side has its Go with generics and one without and in the end we would see which would do better?
- tapirl 10y agowhy not both?
- rdtsc 10y agoGo++ should at least be an April 1st thing, since it is coming up.
- josefx 10y agoIt should add everything C++ has or would that go2far ?
- pjmlp 10y agoBecause everyone of us that cares about generics uses languages that support them, and most likely a Go++ effort would be in vain, after all there are already a few Go preprocessors, which don't seem to be widely adopted.
- k__ 10y agoAlso, are generics really the only way to go? I mean, parametric polymorphism is achievable with different approaches...
- bluejekyll 10y agoAnd maintain type safety?
- vetinari 10y agoMaybe algebraic data types would be more suitable. In Go, you don't have subclassing, so you cannot implement YourClass<T extends SomeAncestor>.
- stymaar 10y ago> Maybe algebraic data types would be more suitable. There is no opposition between ADT and generics. In fact most language that have ADT have generics… > In Go, you don't have subclassing, so you cannot implement YourClass<T extends SomeAncestor>. There is no link between generics and inheritence, functionnal languages usually don't have OOP mechanism but they still have generics.
- deleted 10y ago[deleted]
- zeveb 10y agoTake a look at CLOS. It's for a dynamically-typed language, but the same principles could be used to provide for multi-methods in a statically-type language like Go.
- coldtea 10y agoBecause I don't have Google's money to support it.
- camus2 10y agoWith what money and whom to maintain the fork? The survey even shows that most go users never or rarely contribute the any open source go project (25% + 34% respectively). You'd need a solid corporate backing.
- zzzcpan 10y agoWhy fork? To depend on Go? Compile into Go instead.
- majewsky 10y agoI have repeatedly thought about building a variant of Go that compiles down to Go and then gets compiled by the upstream compiler, mostly to add generics and autogenerate all these if err != nil { return nil, err } blocks. But it would most definitely be a pain in the ass to integrate this with the toolchain.
- deforciant 10y agoso 84% don't want generics, right? :) I switched to Go from Python several years ago, I admit that I missed generics for the first several weeks but then just moved forward. Nowadays I don't really think I actually need them anymore.
- coldtea 10y agoWell, it's not like you had them in Python anyway, so there was not much to miss.
- dragonwriter 10y agoGenerics are a mechanism by which a statically-typed language can approach the generality of abstraction possible in a dynamically typed language while preserving static type safety, so even though Python doesn't have generics, one absolutely would have good cause to miss them going from Python to Go.
- coldtea 10y ago>so even though Python doesn't have generics, one absolutely would have good cause to miss them going from Python to Go. Not really, since you can always just use interface{} for everything and get all the dynamism back. Generics is when you want to have both (dynamism and safety).
- zzzcpan 10y agoUsers always like simplicity in everything. They want a big red button that does what they need. Which is why asking them about design is generally useless. They would choose simplicity every time. There are, of course, some users, that can make substantial comments about design, but they cannot be represented in a survey.
- forgot-my-pw 10y agoActually 31% likes its simplicity (4th rank is simple, 14%). Other similar answers: 2% easy to learn, 2% simple syntax, 2% simple language, 1% easy to use, 1% easy to write, 1% ease of use In the case of generics there's another 1% answer on generic