April 15, 2009
Jarrett Billingsley wrote:
> Out of all the arguments put forth so far, I think this is the
> strongest.  OSX is just the name of Apple's 10th Mac OS.  Why would we
> have version(OSX), but not version(WinXP), version(WinVista),
> version(LinuxUbuntuGutsy) etc. etc. etc.?

Predicting what Apple (or anyone else) will name their next OS is a waste of time. They'll do what they do, and D will try to make an appropriate accommodation.

The reason why there is no WinXP is because people expect their windows apps to run on the gamut of windows versions, and if you're writing code dependent on a particular version of windows, you should do a runtime check for it (like is done in std.file). The same goes for Linux.

Apple's OSs, on the other hand, do not engender an expectation to work that way. The fact that if you compile a "hello world" program in C using the default switches on OSX 10.5 produces a "bus error" when run on 10.4 illustrates a very different world from what I'm used to. As Apple upgrades OSX, I don't know what to expect. We'll see.
April 15, 2009
Denis Koroskin wrote:
> 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...
> 

To my knowledge versions prior to MacOS 10 is not marketed as MacOS X. They're marketed as MacOS 9 (8 or what ever).
April 15, 2009
Walter Bright wrote:
> 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.

They call it "Mac OS", then they add a version like this: "Mac OS 9". Then when the tenth versions came it happened to be built on a nix base/core (known as darwin) and they also added the X (probably to reflect the new nix base, "X" is also ten using roman numerals) making it: "Mac OS X". They still call it "mac os ten" (though some people, including me, like to call it "mac os x" and pronounce the "x" as in the letter "x"). After the "x" they add a name to reflect the version i.e. "Leopard" for version 10.5. Sometimes they refer to the os version with the name and sometimes with the version number.
April 15, 2009
On 2009-04-14 20:19:29 -0400, Walter Bright <newshound1@digitalmars.com> said:

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

It's defined(___APPLE__) && defined(__MACH__) that is used (not "or"). Read it as "An Apple OS running the Mach kernel". Although to be presise, the kernel is XNU, which uses Mach at its core.
<http://en.wikipedia.org/wiki/XNU>

So... perhaps the version identifier should be "AppleMach". :-)

No, seriously, OSX is fine by me.

-- 
Michel Fortin
michel.fortin@michelf.com
http://michelf.com/

April 15, 2009
Tomas Lindquist Olsen, el 15 de abril a las 01:45 me escribiste:
> 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

This is only true when no -std=xxx (where xxx is an standard version
withou GCC extensions) is specified.
__linux__ (or __linux) is always defined.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
April 15, 2009
Tomas Lindquist Olsen, el 15 de abril a las 02:26 me escribiste:
> >> 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.

I agree. I think it should be all CamelCase or all lowercase. I prefer the later because there are situations where CamelCase are not completely intuitive. For example: Osx or OSX?

linux
freebsd
macosx
windows
win32
win64

Looks fine to me.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
April 15, 2009
Jacob Carlborg wrote:
> They call it "Mac OS", then they add a version like this: "Mac OS 9". Then when the tenth versions came it happened to be built on a nix base/core (known as darwin) and they also added the X (probably to reflect the new nix base, "X" is also ten using roman numerals) making it: "Mac OS X". They still call it "mac os ten" (though some people, including me, like to call it "mac os x" and pronounce the "x" as in the letter "x"). After the "x" they add a name to reflect the version i.e. "Leopard" for version 10.5. Sometimes they refer to the os version with the name and sometimes with the version number.

Apple calls it "Mac OS X version 10.5".

There is little consistency in how Apple names their OSs, so there is no way to come up with a version identifier for it that is completely consistent.

April 15, 2009
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/
> 
> Also, gcc on FreeBSD predefines __FreeBSD__
> 
> Clearly, FreeBSD is the term preferred by the FreeBSD community.
> 
> The Mac OSX documentation does not refer to it as darwin, it normally refers to it as OSX. You have to work hard to find any references to darwin on the Apple web site. Nevertheless, "darwin" is predefined for legacy compatibility on the Mac dmd compiler.
> 
> I was concerned that people would see "darwin" support and wonder what that is. OSX is an order of magnitude better known and associated with Apple. Macs are not called "darwins". I suspect we'd get real tired of saying "yes, darwin really means OSX."
> 
> (As an aside, back in the 80's the ubiquitous and famous Wordstar program was produced by Micropro. Nobody could ever remember the company name. After many years of people assuming that Wordstar was made by Wordstar Inc. and fruitlessly trying to find Wordstar Inc., Micropro finally wised up and changed their name to Wordstar Inc.
> 
> Also, note that most bands put out their first CD as a self-titled one.)

I don't mind your conventions if DMD had pioneered these platforms, but it did not.

FreeBSD breaks existing code, and so will OSX whenever darwin is removed. Now a developer already active on those platform is forced to somehow make sure both identifiers are in place until some unknown point in the future.

Since the version identifiers have been established in GDC a very long time ago, and they do follow an acceptable convention, I find it very unnecessary to change that.

As for the darwin vs OSX issue, what I heard is that darwin is technically the more correct one as it is with linux vs Ubuntu, Suse, etc.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango

April 15, 2009
Lars Ivar Igesund wrote:

> FreeBSD breaks existing code, and so will OSX whenever darwin is removed. Now a developer already active on those platform is forced to somehow make sure both identifiers are in place until some unknown point in the future.
> 
> Since the version identifiers have been established in GDC a very long time ago, and they do follow an acceptable convention, I find it very unnecessary to change that.

One *could* argue the same thing about the introduced Posix identifier,
versus the already established Unix so I'm not sure it's entirelly fair
to bash DMD doing the same thing as Tango had already done before it...

http://www.prowiki.at/wiki4d/wiki.cgi?DocComments/Version (from 2005)

Back in the day it made sense to have the "Windows" and "Unix" versions,
and then the specific linux/darwin/freebsd/cygwin/solaris/skyos/etc OS.
If starting over, then I suppose Posix and OSX and FreeBSD "work" too.

--anders
April 16, 2009
Walter Bright wrote:
> Jacob Carlborg wrote:
>> They call it "Mac OS", then they add a version like this: "Mac OS 9". Then when the tenth versions came it happened to be built on a nix base/core (known as darwin) and they also added the X (probably to reflect the new nix base, "X" is also ten using roman numerals) making it: "Mac OS X". They still call it "mac os ten" (though some people, including me, like to call it "mac os x" and pronounce the "x" as in the letter "x"). After the "x" they add a name to reflect the version i.e. "Leopard" for version 10.5. Sometimes they refer to the os version with the name and sometimes with the version number.
> 
> Apple calls it "Mac OS X version 10.5".
> 
> There is little consistency in how Apple names their OSs, so there is no way to come up with a version identifier for it that is completely consistent.
> 

About the "darwin" vs "OSX". There are other operating systems than Mac OS X that could use "darwin" as the version identifier if someone made a D compiler available. iPhone OS (this is just Mac OS X on the iphone and ipod thouch but it's called iPhone OS) and GNU/Darwin for example.