zlacker

[return to "Go is still not good"]
1. the_du+yd[view] [source] 2025-08-22 11:46:04
>>ustad+(OP)
I personally don't like Go, and it has many shortcomings, but there is a reason it is popular regardless:

Go is a reasonably performant language that makes it pretty straightforward to write reliable, highly concurrent services that don't rely on heavy multithreading - all thanks to the goroutine model.

There really was no other reasonably popular, static, compiled language around when Google came out.

And there still barely is - the only real competitor that sits in a similar space is Java with the new virtual threads.

Languages with async/await promise something similar, but in practice are burdened with a lot of complexity (avoiding blocking in async tasks, function colouring, ...)

I'm not counting Erlang here, because it is a very different type of language...

So I'd say Go is popular despite the myriad of shortcomings, thanks to goroutines and the Google project street cred.

◧◩
2. zwnow+de[view] [source] 2025-08-22 11:50:15
>>the_du+yd
What modern language is a better fit for new projects in your opinion?
◧◩◪
3. jiehon+rU1[view] [source] 2025-08-22 21:08:04
>>zwnow+de
Maybe weirdly I’d put swift in there.
◧◩◪◨
4. vips7L+SZ1[view] [source] 2025-08-22 21:40:58
>>jiehon+rU1
Swift is my hope for the next big server language. Great type system, great error handling.
◧◩◪◨⬒
5. gf000+t23[view] [source] 2025-08-23 07:56:39
>>vips7L+SZ1
I haven't followed swift too closely, but ref counting is not a good fit for typical server applications. Sure, value types and such take off a lot of load from the GC (yes, ref counting is a GC), but still, tracing GCs have much better performance on server workloads. (Reference counting when an object is shared between multiple cores require atomic increments/decrements and that is very expensive).
◧◩◪◨⬒⬓
6. zozbot+sh3[view] [source] 2025-08-23 11:14:12
>>gf000+t23
> but still, tracing GCs have much better performance on server workloads

Good performance with traditional tracing GC's involves a lot of memory overhead. Golang improves on this quite a bit with its concurrent GC, and maybe Java will achieve similarly in the future with ZGC, but reference counting has very little memory overhead in most cases.

> Reference counting when an object is shared between multiple cores require atomic increments/decrements and that is very expensive

Reference counting with a language like Rust only requires atomic inc/dec when independently "owning" references (i.e. references that can keep the object around and extend its lifecycle) are added or removed, which should be a rare operation. It's not really performing an atomic op on every access.

[go to top]