News for hackers. Stuff that matters.
Re:Unusual control structures cause us all to slow down a li... by JshWright on Monday January 04, 2010 @07:48AM (#1030229)
I think the particular example given has less to do with the fact that do...while is a less common control structure, and more with the syntax of do...while itself.

I suspect the referenced "slow down" was that the reader will naturally, upon encountering a loop, scroll to the end of the loop and figure out what the conditional is. Obviously the isn't really necessary in a do...while, since that code's going to run once no matter what, but I suspect most of us still do it anyway (like looking both ways before crossing a one way street).

Re:Unusual control structures cause us all to slow down a li... by RyanMcGreal on Monday January 04, 2010 @09:35AM (#1030380)
I've been musing over some of these same ideas since reading Crockford's Javascript: The Good Parts over Christmas break. He certainly makes a strong case for Javascript that it's better to become intimately acquainted with a sensible, well-designed, and mostly gotcha-free subset of the language rather than go crawling into its margins in pursuit of elegance.
Re:Unusual control structures cause us all to slow down a li... by djcapelis on Monday January 04, 2010 @06:42AM (#1030177)
That's probably Stanford University and not Standford University, yeah?
Re:Unusual control structures cause us all to slow down a li... by goplexian on Monday January 04, 2010 @06:48AM (#1030184)
Thanks, yes. Fixed.