40 ms·
How does this work compare with libdill[1]? [1] http://libdill.org/ http://libdill.org/
by clarkmoody 10y ago
How does this work compare with libdill[1]?
[1] http://libdill.org/ http://libdill.org/
- drvdevd 10y agoAt a glance this just looks like a short, simple coroutine implementation/hack using C macros, whereas libdill does a lot more to extend C syntax in similar manner, but in a much more comprehensive way (I believe with the intention of matching some of Go's concurrency mechanisms). The author compares this to Duff's device so the comparison seems apt. I would pick libdill for any serious program and keep this on hand as a C snippet in Vim or $EDITOR. [edit] I should say this could be used in a "serious" program too, but it's nice and short in a way that looks like a great snippet to me
- codr4life 10y agoIt's simpler, to begin with. libdill mixes coroutines with scheduling, there's no reason to do that from my perspective.