← Back to context

Comment by osigurdson

10 hours ago

Go's async story is great, as there is no function coloring at all. That being said, I don't like Go's syntax very much. The runtime is great though.

To be fair, Go’s async story only works because there’s a prologue compiled into every single function that says “before I execute this function, should another goroutine run instead?” and you pay that cost on every function call. (Granted, that prologue is also used for other features like GC checks and stack size guards, but the point still stands.) Languages that aspire to having zero-cost abstractions can’t make that kind of decision, and so you get function coloring.