Re:Duff's device: do + switch fall-through = loop unrolling
by benhoyt on Thursday August 13, 2009 @05:18PM
(#761716)
Are you sure the case-label-fall-through has been its most controversial feature? It's so obscure (most people haven't heard of it) and rarely-used -- I'm guessing there are other aspects of C that are more controversial, or at the very least, more widely debated.
By the by, we've used this "feature" a fair bit in C and C++ for protothreads in small embedded systems: see http://blog.brush.co.nz/2008/07/protothreads/ and http://www.sics.se/~adam/pt/
"This code forms some sort of argument in that debate, but I'm not sure whether it's for or against."
hack^2 - it's so brilliant and so ugly, even his author doesn't know which is more.