dmd 1.043 alpha for FreeBSD 7.1

Tomas Lindquist Olsen tomas.l.olsen at gmail.com
Tue Apr 14 17:26:55 PDT 2009


On Wed, Apr 15, 2009 at 2:19 AM, Walter Bright
<newshound1 at digitalmars.com> wrote:
> 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.

Agreed!

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

Agreed!

>
>> __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.

According to the site I linked __MACH__ and __APPLE__ are both for
OSX, I guess that might be wrong, I've never really had to code for
OSX.
Still Apple call it "Mac OS X" so one could argue that "MacOSX" is a
better identifier.

>
>> 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 simply don't agree here. To me, linux (as opposed to Linux) is a
special case that I need to remember, the others follow a pattern.

>
>> 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.
>

Maybe it makes sense to you. Not to me.


More information about the Digitalmars-d-announce mailing list