Hacker News new | ask | show | jobs
by whimsicalism 1073 days ago
Go was successful because it came after decades of pretty much no language putting good networking tools in their stdlib.
3 comments

Not just networking but focusing on concurrency.

In before if you needed to make a highly concurrent network app you had to get into asynchronous programming that generally makes code looks shit (or at least slightly worse) and harder to debug.

With Go and goroutines taking IIRC around 8k for start you can "just" spawn as many of them as there are connections and write your code as if it was serial one. Add some half-decent concurrency primitives and it's pretty easy to not fuck up highly concurrent and highly parallel code.

Erlang's been around forever, also a fairly simple language. I'd imagine concurrency's easier than on Go.
Erlang had a better concurrency story than Go, and better error handling. But alas marketing wins.
Marketing, lol. Erlang is a functional language. Functional. That alone has prevented its widespread adoption.
Erlang needs a VM. Not statically typed. Poor compute performance. Poor strings.
Erlang is dynamically typed.
Erlang, frankly, has a lot of problems. The first major thing I used Go to do in the 1.4-1.6 era was to migrate my multi-year production Erlang system to Go, and I never looked back.

Somehow Erlang gets this special dispensation where people get to talk about it as if it's still 2005 and it's still this unique and interesting snowflake with virtually no competition. Which it was... back then. But having successfully convinced the world that there's an interesting space there, in 2023 there's a ton of options and the point in that space Erlang staked out isn't actually that interesting or unique when you measure it by 2023 instead of 2005.

I agree with you. Are there languages beyond Go that you would measure Erlang against in the dimension of concurrency ergonomics?
The process of bringing types to Elixir is officially underway:

https://elixir-lang.org/blog/2023/06/22/type-system-updates-...

It's not Erlang specifically, but it is a BEAM language, so tomato tomahto.

True, and Go has a much better story in some other areas, but “…if you needed to make a highly concurrent network app you had to get into asynchronous programming that generally makes code looks shit” is inaccurate.
This doesn't say much because people generally throw interface{} everywhere.

Go is used because Google and that's it.

No, they don't. They didn't before generics and they do even less now.

You can tell this is an accusation thrown around by non-Go programmers because frankly, throwing around a lot of interface{} was always really inconvenient. It's not something the language trains you to do... it's something you get punished for, really quite hard.

Not sure if that alone is what made Go successful. But yes, having great networking tools in the stdlib is very refreshing! One of the things Go got right.
The google brand name behind it also definitely played a role.