C locale

"Luís "Luís
Fri Sep 27 16:44:59 PDT 2013


On Friday, 27 September 2013 at 19:23:12 UTC, Walter Bright wrote:
>     static assert(0);

Do you prefer assert(0) instead of assert(false)? Is it not worth 
to put a message after the 0/false? (static assert(0, "foo 
missing"); )

I can send a pull request with the values filled-in for Windows 
and OS X.

>> - Why, oh why, is "linux" the only OS version() identifier 
>> that is not
>> capitalized?
>
> Because "linux" is what gcc predefines for Linux. (gcc also 
> sets __gnu_linux, __linux__, and __linux, none of which are 
> capitalized. It's the Linux way, not some nefarious plot of 
> mine to disparage it.)

Haha :-) I understand, my remark was lighthearted. Still, it 
seems a bit inconsistent and error prone, given the other 
identifiers. I mean, I'm all in favor of using "darwin" for OS X 
(more technically correct, and allows your code to compile in a 
pure Darwin environment), but if you changed it to "OSX" because 
it was more discoverable then... that's the kind of usability 
issue I'm talking about.

BTW, does that mean that gcc also defines capitalized "OSX", 
"Posix", etc.? (otherwise I don't understand your argument)


More information about the Digitalmars-d mailing list