Predefined Version Identifier on Linux

Daniel Keep daniel.keep.lists at gmail.com
Wed Mar 28 06:01:32 PDT 2007



Carlos Smith wrote:
> : It's consistent with the macro "linux" predefined by gcc 
> on linux.
> 
> Version identification should be case insensitive.
> 
> What is the point to make a difference between
> 
>   Linux
>   linux
> 
> or
> 
>   Win32
>   WIN32
>   win32
> 
> Did anybody asked for this before ?

Probably because everything else in the language is case-sensitive;
having a single, non-obvious break would be a bit silly.  Plus, we would
*then* have people coming and asking "why are version identifiers
case-insensitive: they should be case-sensitive".

<joke>
Now, the *real* solution to this problem is to rename all the
identifiers to use l33t speak and alternating caps.  This way, everyone
is annoyed equally, and no one group has an advantage over the others.

Sure everybody loses, but at least we all lose *equally*.
</joke>

<joke type="alternate" id="1">
Just look at it this way: you Linux people are better off since you
don't need to use the shift key to type your platform identifier!  Less
key presses == more productive!
</joke>

<joke type="alternate" id="2">
The real reason Walter did this is because he's trying to discourage
people from writing non-portable code.  He probably figures that it he
makes every single platform identifier different in some subtle,
non-predictable manner, people will get sick of it and just write
portable code in the first place.

Coming soon: version( MACos_X )!
</joke>

Sorry.  I haven't had the opportunity to annoy anyone today, and I just
watched House.  Baaaad combination...  ;)

	-- Daniel

-- 
int getRandomNumber()
{
    return 4; // chosen by fair dice roll.
              // guaranteed to be random.
}

http://xkcd.com/

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list