April 14, 2009
On Wed, 15 Apr 2009 01:48:00 +0400, Jacob Carlborg <doob@me.com> wrote:

> Walter Bright wrote:
>> Lars Ivar Igesund wrote:
>>> Walter Bright wrote:
>>>
>>>> Now works for FreeBSD 7.1!
>>>
>>> Nice!
>>>
>>> But is there a particularly good reason for disregarding version identifiers already established by gdc and ldc?
>>>
>>> freebsd vs FreeBSD, darwin vs OSX
>>  FreeBSD is how it is normally written in the official FreeBSD literature, such as : http://www.freebsd.org/
>
> If you follow what's normally written in the official literature and documentation shouldn't it be "MacOSX" then?
>

I also wonder why it is OSX. Are versions prior to MacOS 10 (which is marketed as MacOS X) officially unsupported by D?
It's also funny to see that Walter officially deprecates something that he didn't invent.

Not that I complain about something, it's just a bit strange...

April 14, 2009
Jacob Carlborg wrote:
> It depends on what documentation you read. http://developer.apple.com/documentation/Darwin/index.html
> In this documentation "Darwin" is all over the place.

Move up a directory, and it's OSX, OSX, OSX.
April 14, 2009
Jacob Carlborg wrote:
> If you follow what's normally written in the official literature and documentation shouldn't it be "MacOSX" then?

Perhaps. One could argue it either way. I checked the predefined identifiers in gcc for guidance, and found just the unfortunately generic __APPLE__. I wish Apple would make up their mind what they wanted to call their OS.
April 14, 2009
Walter Bright wrote:
> Tomas Lindquist Olsen wrote:
>> And if not, why is there no Linux ? This is the obvious reason for
>> GDC/LDC pick the lowercase identifiers in the first place ...
> 
> Because gcc on linux predefines "linux", not "Linux".

Why not define both variants?
April 14, 2009
Walter Bright wrote:
> Also, note that most bands put out their first CD as a self-titled one.

In my collection (admittedly a small sample; 90 bands), only 6/13 self-titled albums are first albums.
April 14, 2009
Christopher Wright wrote:
> Walter Bright wrote:
>> Tomas Lindquist Olsen wrote:
>>> And if not, why is there no Linux ? This is the obvious reason for
>>> GDC/LDC pick the lowercase identifiers in the first place ...
>>
>> Because gcc on linux predefines "linux", not "Linux".
> 
> Why not define both variants?

Pointless clutter, and the inevitable time-wasting "which one should I use?"
April 14, 2009
Robert Fraser wrote:
> Walter Bright wrote:
>> Also, note that most bands put out their first CD as a self-titled one.
> 
> In my collection (admittedly a small sample; 90 bands), only 6/13 self-titled albums are first albums.

I salute you, sir, for actually doing some research on this important topic! <g>

Of course, the greatest band evar, Led Zeppelin, self-titled their first 3 albums. Chicago self-titled practically every one of their albums, and is "second only to the Beach Boys as the most successful American rock band of all time, in terms of both albums and singles" according to Amazon.
April 14, 2009
On Tue, 14 Apr 2009 12:49:02 -0700, Walter Bright <newshound1@digitalmars.com> wrote:

> Tomas Lindquist Olsen wrote:
>> And if not, why is there no Linux ? This is the obvious reason for
>> GDC/LDC pick the lowercase identifiers in the first place ...
>
> Because gcc on linux predefines "linux", not "Linux".


How about just making version and debug identifiers case-insensitive? Aren't they already in their own special namespace; they're special-case (pun intended).
April 14, 2009
On Tue, Apr 14, 2009 at 11:51 PM, Walter Bright <newshound1@digitalmars.com> wrote:
> Tomas Lindquist Olsen wrote:
>>
>> On Tue, Apr 14, 2009 at 9:49 PM, Walter Bright <newshound1@digitalmars.com> wrote:
>>>
>>> Tomas Lindquist Olsen wrote:
>>>>
>>>> And if not, why is there no Linux ? This is the obvious reason for GDC/LDC pick the lowercase identifiers in the first place ...
>>>
>>> Because gcc on linux predefines "linux", not "Linux".
>>>
>>
>> It seems somewhat arbitrary, but fair enough..
>
> It's just one less thing to remember when switching between C and D.
>

After reading more, I just can't help but feel this is wrong.

linux is still the only version identifier following this "logic".

Comparing http://predef.sourceforge.net/preos.html and D:

linux -> linux
_WIN32 -> Win32
_WIN64 -> Win64
__FreeBSD__ -> FreeBSD
__APPLE__ or __MACH__ -> OSX

Even if you strip underscores, OSX and Win32/64 still don't match C/C++ identifiers. Why should linux be special?

I realise this is a minor thing probably not worth the time it gets, but D seems to have a tendency to throw in inconsistencies in every crack there is to find ...
April 15, 2009
Tomas Lindquist Olsen wrote:
> After reading more, I just can't help but feel this is wrong.
> 
> linux is still the only version identifier following this "logic".
> 
> Comparing http://predef.sourceforge.net/preos.html and D:
> 
> linux -> linux
> _WIN32 -> Win32
> _WIN64 -> Win64

Microsoft predefines _WIN32 for Windows 64, too!
D:
   Windows: All members of the Windows family
   Win32: specific to Windows 32
   Win64: specific to Windows 64
That seems sensible to me.

> __FreeBSD__ -> FreeBSD

The __ are ugly but necessary because of the C standard, but they are ugly and *unnecessary* for D.

> __APPLE__ or __MACH__ -> OSX

Apple has made many operating systems besides OSX, so __APPLE__ is out. I can't even remember which OS Mach is.

> Even if you strip underscores, OSX and Win32/64 still don't match
> C/C++ identifiers. Why should linux be special?

Because the gcc macro suits the need perfectly. The others don't.

> I realise this is a minor thing probably not worth the time it gets,
> but D seems to have a tendency to throw in inconsistencies in every
> crack there is to find ...

If gcc had any consistency, I'd use that. But it doesn't. It makes sense to use gcc's precedent when gcc makes sense, and to diverge when gcc does not make sense.