Times were very different when K&R were constructing a programming language and operating system from scratch. If one doesn't like C, then don't use it. David On 2009-06-29, at 6:28 AM, olin_piclist@embedinc.com (Olin Lathrop) wrote: > Marcel Birthelmer wrote: >> You must realize that they probably knew what they were doing in >> implementing it the way they did. > > No, I think they were a couple of hackers that had no programming > discipline > and had disdain for languages that tried to enforce it. I think we > all know > a few people like that, or maybe even were like that back when we > first > learned to write computer programs. Most of us grow out of it. K+R > didn't. > >> The above-linked Duff's Device is an >> example of why the switch statement in C is useful the way it is. >> Yes, it's a trap sometimes, and yes I've fallen into it, but I think >> it's worth having it to make the language a worthwhile replacement >> for hand-coding in assembler, which is what one might have to resort >> to in order to achieve such a performance boost. > > There was no link above, and I didn't pay much attention to the first > message about Duff's device. Perhaps if you describe it breifly or > provide > a example, I can see what the equivalent Pascal would look like and > whether > a reasonable compiler would produce the same code as C would or not. > > > ******************************************************************** > Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products > (978) 742-9014. Gold level PIC consultants since 2000. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist