Re:Go Contracts – Draft Design
by 6ue7nNMEEbHcM on Monday July 29, 2019 @01:25PM
(#20557029)
Generics help with reducing of code duplication. This doesn't really depend on what you want to do exactly, more on how complex your code base is.
Re:Go Contracts – Draft Design
by InvOfSmallC on Monday July 29, 2019 @04:14PM
(#20558877)
Microservices? I'm sorry but what do you mean? Don't you use business logic in your microservice or you just do I/O without actually doing something with the input?
Generics is for that part.
What I really like about Go is the consistency of their tooling. gofmt, godoc, the GOPATH convention, single binary deployments. I like all of that.
Maybe we could port some of those ideas to other languages so that Go programmers will feel at home :)
Static compiling, common across all OSes before it became an option alongside dynamic linking.
Fast compile times, already being enjoyed by many with Turbo Pascal for MS-DOS, or Object Pascal for Mac OS, among other languages with similar support for modules.
Godoc, javadoc did it first.
Gofmt, indent was one of the first and every IDE has done it since ages.
Other languages already have those ideas.
In those worlds you're more likely to move data between logical units in JSON or Protobufs (both of which Go is good for) than to need proper generics so I don't understand the push from this subset of the community.
As far as container types and data structures, look at the number of well built storage solutions that don't seem encumbered by the lack of generics at all like: boltdb, bleve, BadgerDB, InfluxDB, etc.