Developer Proposes New (and Compatible) ‘Extended Flavor’ of Go
If such a fork takes place, Carmi writes on Medium, he hopes the two languages could interact and share the same runtime environment, libraries, and ecosystem — citing lessons learned from the popularity of other language forks:
There are well-known, hugely successful precedents for such a move. Unarguably, the JVM ecosystem will last longer and keep on gaining popularity thanks to Scala and Kotlin (a decrease in Java’s popularity is overtaken by an increase in Scala’s, during the previous decade, and in Kotlin’s, during this one). All three languages contribute to a stronger, single community and gain stronger libraries and integrations. JavaScript has undoubtedly become stronger thanks to Typescript, which quickly became one of the world’s most popular languages itself. I also believe this is the right move for us Gophers…
Carmi applauds Go’s readability-over-writability culture, its consistent concurrency model (with lightweight threading), and its broad ecosystem of tools. But in a second essay Carmi lists his complaints — about Go’s lack of keyword-based visibility modifiers (like “public” and “private”), how any symbol declared in a file “is automatically visible to the entire package,” and Go’s abundance of global built-in symbols (which complicate the choice of possible variable names, but which can still be overriden, since they aren’t actually keywords). After a longer wishlist — including null-pointer safety features and improvements to error handling — Carmi introduces a third article with “A Proposition for a Better Future.”
I would have loved to see a compile time environment that mostly looks like Go, but allows developers to be a bit more expressive to gain maintainability and runtime safety. But at the same time, allow the Go language itself to largely remain the same and not evolve into something new, as a lot of us Gophers fear. As Gophers, why not have two tools in our tool set?
The essay proposes a new extended flavor of Go called Goat — a “new compile-time environment that will produce standard, compatible, and performant Go files that are fully compatible with any other Go project. This means they can import regular Go files but also be safely imported from any other Go file.”
“Goat implementation will most likely be delivered as a code generation tool or as a transpiler producing regular go files,” explains a page created for the project on GitHub. “However, full implementation details should be designed once the specification provided in this document is finalized.”
Carmi’s essay concludes, “I want to ignite a thorough discussion around the design and specification of Goat…. This project will allow Go to remain simple and efficient while allowing the community to experiment with an extended flavor. Goat spec should be driven by the community and so it needs the opinion and contribution of any Gopher and non-Gopher out there.”
“Come join the discussion, we need your input.”
Related link: Go principal engineer Russ Cox gave a talk at GopherCon 2022 that was all about compatibility and “the strategies Go uses to continue to evolve without breaking your programs.”
Read more of this story at Slashdot.