Why version() ?

Nick Sabalausky a at a.a
Fri Feb 13 10:49:39 PST 2009


"Jacob Carlborg" <doob at me.com> wrote in message 
news:gn49b6$49b$1 at digitalmars.com...
> Walter Bright wrote:
>> Anders F Björklund wrote:
>>> Walter Bright wrote:
>>>
>>>>> OSX is the new name for Apple's OSes: Mac OS X and iPhone OS.
>>>>>
>>>>> And of course DMD can use anything, but GDC uses darwin/Unix.
>>>>
>>>> Apple can't seem to make up their mind. uname does return "Darwin". gcc 
>>>> predefines "__MACH__" and "__APPLE__", but neither darwin nor osx. The 
>>>> documentation all says osx.
>>>
>>> Will you set version(darwin) though, or would that be "version(osx)" ?
>>>
>>> The existing D code for Mac OS X all uses version(darwin) from before.
>>
>> version(OSX)
>>
>> I just don't think darwin is a good idea, as Apple doesn't even use it. 
>> See http://developer.apple.com/unix/index.html, where "darwin" is clearly 
>> second string. It looks like Apple is pushing aside "darwin" in favor of 
>> "OSX".
>
> I'm not going to argue about what is the best version identifier for Mac 
> OS X, the I only thing I care about is consistency and "darwin" is already 
> used by LDC and GDC. Don't make things harder.
>
>> Fortunately, (darwin) => (OSX) is a trivial global search/replace.
>
> And I assume it's equally trivial to implement "darwin" as the version 
> identifier. Again, don't make things harder by breaking existing code.

I don't have an opinion on the correct identifier to use, but not 
implementing a change that makes something more correct *just* because it 
breaks existing code (particularly in an easy-to-fix way) is a terrible 
strategy. That's exactly what's turned C++ into the abysmal mess that it is 
today, which in turn is one of the primary reasons for D's existence. I 
don't want to end up with yet another C++. 





More information about the Digitalmars-d mailing list