It's already quite popular. I'm less convinced there's a large pile of people wishing for a fairly high performance garbage collected language that are not using Go because of this. There just aren't many viable alternatives.
Java and C# being the obvious (and more performant) alternatives. And compared to them, Go already wins because of not being, well, "enterprisey". And with that I mean less the languages itself, but also the whole ecosystem around them.
There are definitely lots, I'm one of them. I use Scala, which is very powerful and imho much nicer language than golang. But the tooling and other support is slow and subpar. But I just can't go back to a brain-dead language(!) like golang because it hurts to program in such languages to me. So I hope that either golang catches up with Scala's features, or that Scala catches up with golangs tooling.
And I think there are many similar people like me.
Scala is overcomplicated esoteric programming language. It is great for obfuscation contests. It is awful for production code, since Scala code lacks maintainability, readability and simplicity properties.
Perhaps, but other languages that look a lot like Go with these additions (e.g. OCaml) have not gained much popularity, despite getting much more love on forums like HN. It's important to remember that the people expressing strong opinions about sum types on the internet are a tiny and non-representative fraction of working programmers.
I blame C# for the confusion. Think of it this way: the ability to explicitly express a type Foo|null implies the existence of a non-nullable Foo as well. IOW it’s shorthand for “nullable and non-nullable types”.
I'm surprised nobody mentioned types or type systems as one of the best solutions for eliminating fear. Out of all the systems that worked on, the ones that were changed fearlessly were stuff written in Haskell and Purescript. That was before Rust became so popular. These systems were changed fearlessly and we had very minimal tests. The code reviews were much easier to perform as you don't tend to check if the code might throw exceptions but you just need to think about business logic.
These days I'd argue that Rust is at the same level of Haskell and Purescript in fearlessness.
Some languages that removes certain fears:
- Kotlin: removes the fear of null exceptions
- Go: removes the fear of forgetting about an error that this function throws
- Languages with ADT (Haskell, Rust ... etc): remove the fear of missing a case
I'd claim that this is a logic that comes from rich, first world countries where you don't need to prioritize things in life much, as you can mostly afford everything. Poor people have to think thoroughly about everything they spend money on.
Java is often slightly faster than Go, has similar (perhaps, older, better optimized Map) constructs, perhaps better GC (older, more optimized), though I don't think the GC is a challenge, has slower startup times - so I'd say roughly the same as the idiomatic Go version?
Java can be faster than Go, but it comes at the same cost as most "faster" things in software: Java uses significantly more memory.
Java is also more mature, which means you are entering a massive package-bloat setup that has evolved over the years to work for everyones wild and varied needs. By the time you have your database, cache, http/other handlers, tests, fixtures, metrics, logging, tracing, etc... setup you're looking at a scary pile of dependencies spanning thousands of classes that would make even NPM jealous.
Java’s GC is just incomparably better, literally every research on the topic is written for Java. Though that’s true that without value types, Java does rely slightly more on it.