3 ms·
You needn't worry about Go being too simplistic for much longer. It looks like they're going to add a bloated form of generics soon, with something called "cont
by vorg 8y ago
You needn't worry about Go being too simplistic for much longer. It looks like they're going to add a bloated form of generics soon, with something called "contracts" that's almost the same as "interfaces" but a little different. A few versions back, Go added "aliases" of types, but it was almost aliases of anything -- only intense community pressure prevented that bloat. And having had a special rule in its short-form declarations to make error handling a little terser, Go is looking at bringing another syntactic shortcut called "handle-check" to bring a little more error-handling tersity. Go's simplicity will be gone in a few short years.
- lllr_finger 8y agoIt took 10 years to move the needle on generics and better error handling, and the draft solutions for both still smell of minimum usefulness/minimum complexity in the language. Whether that's a good approach is up to the individual, but I don't see Go 2 ending up as some unwieldy monstrosity. I'm curious how the proposal for generics is "bloated" - especially as compared to something like C# or Rust.
- vorg 8y agoJust because the currently-proposed Go generics is less bloated than those of C# and Rust doesn't mean it isn't "bloated" compared to Go 1.11. And I wouldn't call the description of contracts in the discussion document from last month "minimum complexity".