Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's fair to say that Go was hardly the first language to implement the concept of coroutines[1]. Probably the only merit of Go here is the short and convenient name of the 'run' method.

[1] https://en.wikipedia.org/wiki/Coroutine#Implementations



    > libmill was a project that aimed to copy Go's
    > concurrency model to C 1:1 [...]

    > libdill is a follow-up project that experiments with
    > structured concurrency and diverges from the Go model.
http://libdill.org/documentation.html


I would say the main advantage is being able to pass couroutine arguments as if it was a simple function. In other coroutine implementations in C (e.g. libtask) you have to make a struct containing all the args and pass that to the run function.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: