Quote:
|
Originally Posted by Kevin Sevcik
...a beautiful piece of C code...Duff's device:...
|
Beauty is in the eye of the beholder. So, apparently, is
ugly.

Duff's Device is clever, but it goes back to my old comment about c wanting the programmer to "think like a compiler". Optimizations like this should be done in the compiled code, not the source code.
I guess my discomfort with c boils down to the fact that it's a low-level language in high-level language clothing. It's not far removed from assembly language. I do understand the reason for its being that way. That doesn't mean I have to like it.
