--On Friday, April 14, 2006 4:28 PM -0700 Brian Degenhardt
<[EMAIL PROTECTED]> wrote:
Unless somebody can explain why for(;;) is inferior to do{}while(1), or
why removing curly braces on one-line if statements is worth the
trouble of patch maintainers everywhere, I think this just does more
harm than good.
Just FYI, from a 25-year C programming veteran: for (;;) is a more
efficient loop than while (1) for some compilers, because there is no
comparison to zero required. In modern reality most optimizers will make
them identical, but it is conceivable that there might still be a system
around that treats these literally. In any case, it's certainly clear to
me that either of them is far more readable than do {} while (1)!
I also think extraneous curly braces are annoying, but I can appreciate
both points of view on this one.
Whether readability patches do more harm than good I'll leave up to you,
but I'm a BIG fan of consistency and readability. Okay, back to lurking.
Mark
--
Mark Sirota, Associate Director, Network Engineering and Services
University of Pennsylvania, Information Systems and Computing
[EMAIL PROTECTED], 215/573-7214
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev