5 ms·
As a Java developer I would need a few things to switch and maintain my current level of productivity: generics, a map/filter/reduce paradigm for working on col
by twblalock 7y ago
As a Java developer I would need a few things to switch and maintain my current level of productivity: generics, a map/filter/reduce paradigm for working on collections, and more flexible error handling -- in that order.
Oh, and let me leave "fmt" in the list of imports even when it's unused, because adding it every time I stick in a printf to debug something, and then needing to remove it later because of compiler errors, is incredibly frustrating.
- coryrc 7y agoIntegrate `goimports` into your editor.
- spyspy 7y agoIt's been an unpopular opinion but I've contended for a long time that if Go had map/filter/reduce from the onset like it has copy and append, most people screaming for generics would have been silenced.
- xzel 7y agoBut doesn't that require some level of generics? This is an honest question not rhetorical / a retort.
- majewsky 7y agoGo has several generic functions like append() or make() baked into the compiler (https://golang.org/pkg/builtin/ https://golang.org/pkg/builtin/). When people are asking for generics, they're asking for a language-level mechanism for defining additional generic functions beyond these provided by the compiler.
- xzel 7y agoI'm talking more along the line for Map/Filter/Reduce support and why those weren't included in Go originally.
- majewsky 7y agoYes. The distinction is that there are two ways to implement map/filter/reduce: either as additional built-in functions or in std. Only the second way requires language-level generics support.