Hacker News new | ask | show | jobs
by kristoff_it 1326 days ago
Goroutines (and stackful coroutines in general) require a runtime. Go has to sprinkle suspension points everywhere in the machine code (to prevent starvation) and when it needs to grow a goroutine stack, it also needs to know how to adjust every single relevant pointer in the entire program's memory to point to the new stack location.

This is not something that a systems programming language would want to do. I agree with your point that structured concurrency is good and preferable for high-level languages, but it's not an absolute better choice when you start thinking about the details, like you have to do in a systems programming language.

1 comments

Agree, while I prefer the Go model from a usability perspective, I don't think that is the way to go for a language such as Zig. Zig seems to have done a really good job within the boundaries set by a language which aims for minimal level of abstraction.