-
> It communicates hostility and disbelief rather than curiosity.
I don't share that opinion.
> https://github.com/golang/go/issues/60078 is where this is discussed.
We can discuss semantics here, but a breaking change, to me, is one that that breaks well-crafted existing code. Well, what kind of code relies on the fact that closures over the iteration target examine a value that depends on runtime behavior?
I have stumbled upon this issue myself when I first learned Go. I have used Go professionally and in private projects and since long before modfiles became a thing. I have NEVER seen code that relies on this unintuitive, behavior of loop variables. This is not a change that breaks something good, this is a fix that removes a footgun from the language.
Further down, rsc writes this (https://github.com/golang/go/issues/60078#issuecomment-15424...)
That's some of the real-world evidence in favor of changing 3-clause loops.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
> I'm not sure here how you differentiate minimalist from restrictive.
The flexibility of the language and its syntax. The more constructs are syntactic, the less minimalistic it is, and Go is a very syntactic language.
> I've always considered Go to be minimalist in terms of available tokens to the programmer: https://github.com/e3b0c442/keywords/blob/main/chart.png
No language on this chart has even a passing resemblance to minimalistic. I don't think anything does when it reaches double digit keywords.
For reference, I believe Smalltalk has 6.
And forth is more complicated because it doesn't really have keywords at all, and barely any syntax, instead it has assembly-coded / runtime-provided words (~functions) and variables. SectorForth (https://github.com/cesarblum/sectorforth/) is down to 8 builtin words, 2 IO words, and 5 variables (milliforth packs those behind a word instead). And so far 2 of the words have been found unnecessary / redundant.
-
-
> I'm not sure here how you differentiate minimalist from restrictive.
The flexibility of the language and its syntax. The more constructs are syntactic, the less minimalistic it is, and Go is a very syntactic language.
> I've always considered Go to be minimalist in terms of available tokens to the programmer: https://github.com/e3b0c442/keywords/blob/main/chart.png
No language on this chart has even a passing resemblance to minimalistic. I don't think anything does when it reaches double digit keywords.
For reference, I believe Smalltalk has 6.
And forth is more complicated because it doesn't really have keywords at all, and barely any syntax, instead it has assembly-coded / runtime-provided words (~functions) and variables. SectorForth (https://github.com/cesarblum/sectorforth/) is down to 8 builtin words, 2 IO words, and 5 variables (milliforth packs those behind a word instead). And so far 2 of the words have been found unnecessary / redundant.
-
-
This is a lot more possible now that Go has generics (as of 1.18).
I would probably never use these, as I find such libraries are a whole new domain-specific language to learn, and often don't make things much simpler anyway, but here are some libraries where people have done something like this:
* https://github.com/ahmetb/go-linq: modelled after LINQ, but created pre-generics so only recently added some generics features
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
* https://github.com/asynkron/gofun: simple library with stand-alone functions to filter, map, and so on