DMD 0.148 release
Walter Bright
newshound at digitalmars.com
Tue Feb 28 02:10:26 PST 2006
"Derek Parnell" <derek at psych.ward> wrote in message
news:14g4upyin8106$.uuzir980l0jb.dlg at 40tude.net...
> Agreed that the 'while(1)' idiom is not going anywhere, but Walter, which
> would *you* write using D nowadays?
>
> while(1) ...
>
> or
>
> while(true) ...
>
> And why would you choose one form over the other?
They are both equivalent. There is no technical, usability, portability,
efficiency, or aesthetic advantage to one form over the other. I'd likely
use the former simply out of habit and because it is shorter. As far as I'm
concerned, arguing about it is like arguing over if the { goes on the same
line or the next :-)
What I especially think is bad style, however, are things like:
const int forever = 1;
...
while (forever) ...
I don't see them too often, but it does happen.
More information about the Digitalmars-d-announce
mailing list