Goenums: Type Safe Enum Generator for Go
github.com
github.com
- Rob Pike
I've been using Go on a large codebase for a number of years, and I haven't found data races to be a problem in practice.
I completely fail to see where Go excels. Large, statically linked binaries that aren't even concurrency safe...? Really? No enums? Odd syntax (I like Rust, C++ and Haskell, I find Go's syntax odd still).
Like so many Google products, it solves a problem that nobody I know has. And I guess they can afford concurrency bugs, who cares, its only a language primarily for concurrency.
In my experience, Go excels at pushing you towards solving the problem rather than yak shaving. And in my opinion that is worth it’s relatively minor frustrations.
Unlike Rust, one is not required to have three digit IQ to use the language, so that's why I've been using it where previously I would have resorted to Python (and then either copy venvs around, or write packages for my packages to ship dependencies of my dependencies).
I too fail to see why would anybody use it for anything else, especially compilers or more complicated server stuff where you really benefit from having a proper type system, but people do, so I must be missing something...
That's it, mostly. CRUD is also a huge part of the industry, unlike "Serialization/deserialization", which are a means to an end.
> Either nodejs, something static on an existing webserver, or rust for backends.
Horrendous choices, I daresay.
Why do people use Java and C# ?
Whole kubernetes, docker, traefik and many other cloud native tools are written in go.
I seriously doubt it for the same reason that Google, with all of its expertise and tooling for it, didn't choose C++, twice.
I say this not just for Kubernetes etc., but greenfield projects today as well.
https://deislabs.io/posts/still-rusting-one-year-later/
I gather you are aware of Deis Labs history, Microsoft acquisition and such, do you want other CNCF companies that have pivoted into Rust?
> [Warning] This project is currently not actively maintained.
But there is a library by them to build containerd shims with which is maintained: https://github.com/containerd/runwasi
Let's just entertain the idea and pretend that this is a notable project and that one would count it as DevOps tooling. Here are the top 10 across the CNCF in terms of size, courtesy of GitHub's API:
C++: 3195829832
Java: 2908175049
Go: 2005598094
C: 1225503783
Python: 931070259
LLVM: 594277917
C#: 484071185
Rust: 460427159
TypeScript: 428904119
JavaScript: 273074800
This is the best-case scenario, including irrelevant categories like databases and VMMs that ought to be written in Rust (or C++).As far as Microsoft itself goes, they have a new push to ~~lock-in~~ embrace and extend cloud customers:
https://blog.radapp.io/posts/2024/04/16/radius-accepted-as-c...
As far as recent projects that gained traction with the CNCF go, I found some nice write-ups:
https://blog.palark.com/cncf-sandbox-2023-h1/
https://blog.palark.com/cncf-sandbox-2023-h2/
https://blog.palark.com/cncf-sandbox-2024-h1/
Go: 30
Rust: 4 (once to implement another lang)
Python: 2
Java: 1
and 2 that are mixed (Go+{C,Rust})
Fun fact, one of the 30 is Eraser - by Deis Labs.Do you think UNIX was sold at VMS, MVS, System/360 prices, even with university discounts, every university on the planet would have been rushing to adopt it on their timesharing systems?
The lawsuits done by AT&T years later, the prohibition of Lion's book, and Sun introducing the concept UNIX developer license, shows how it would have gone.
It's possible to support everybody's needs in a single language, but I'm not aware of any language that has done it yet.
Enums has always felt very natural in every modern languages i've tried (swift and rust, for example), even with associated values. The underlying "sum type" concept also is very intuitive, and seems very complementary to structs for example.
Can you expand a bit on what you mean ?
https://en.cppreference.com/w/c/language/enum
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
https://docs.python.org/3/library/enum.html
https://api.rubyonrails.org/v5.2.4.5/classes/ActiveRecord/En... https://sorbet.org/docs/tenum
https://docs.oracle.com/javase/tutorial/java/javaOO/enum.htm...
https://dart.dev/language/enums
https://www.postgresql.org/docs/current/datatype-enum.html
https://dev.mysql.com/doc/refman/8.4/en/enum.html
https://zig.guide/language-basics/enums
https://www.erlang.org/eeps/eep-0013
https://hackage.haskell.org/package/planet-mitchell-0.1.0/do...
https://www.ibm.com/docs/en/openxl-fortran-aix/17.1.1?topic=...
Kotlins syntax is in general a bit underrated imo and I disagree that Java is up to par.
Granted, Niklaus Wirth removed them from Oberon-07, then again even as big fan of his work, that isn't the Oberon version I prefer, rather Active Oberon.