dmd 1.043 alpha for FreeBSD 7.1
Walter Bright
newshound1 at digitalmars.com
Tue Apr 14 17:19:29 PDT 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.
More information about the Digitalmars-d-announce
mailing list