DMD 0.148 release
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Mon Feb 27 00:15:01 PST 2006
Walter Bright wrote:
> "Ivan Senji" <ivan.senji_REMOVE_ at _THIS__gmail.com> wrote in message
> news:dttebh$2kqq$1 at digitaldaemon.com...
>
>>>Ever seen this:
>>>
>>>while(1)
>>
>>I sure did, and it scares the hell out of me :)
>
>
> Why? This is a practice I got into with C/C++, and I did it because 1 cannot
> be redefined by the preprocessor into something goofy. I.e., I *knew* what
> it was without having to go spelunking through header files.
One more thing. I heared from a Ruby user that in Ruby 0 means true.
To that user while(1) is pefectly obvious it is a block of code executed
exactly once. No problems in understanding that for a Ruby user.
But to me 1 isn't true, and isn't false. It is an implementation detail
that should be hidden from users.
As I said in another thread: programming language constructs should have
a meaning when translated to a human language.
What would: "if 75 then some people dont like type safety" mean? To me
and a lot more people it means nothing.
More information about the Digitalmars-d-announce
mailing list