4 ms·
At 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 man
by drvdevd 10y ago
At 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