Thread overview
Re: dmd 1.043 alpha for FreeBSD 7.1
Apr 15, 2009
Jordan Miner
Apr 16, 2009
Leandro Lucarella
Apr 20, 2009
Jordan Miner
April 15, 2009
Walter Bright Wrote:

> Because gcc on linux predefines "linux", not "Linux".

Please change the version identifier from linux to Linux.

D is a chance to fix stuff wrong or inconsistent in other languages. C compilers may use inconsistent naming like __APPLE__, __MACH__, __linux, _WIN32, _WIN64, __FreeBSD__, etc. Why not take the opportunity to fix the inconsistency in addition to all the other improvements D has?

The argument that it should be linux because of gcc does not apply to those who come from other languages. If someone is learning D after only knowing Java or C#, and they want to use versioning, linux is harder to remember for them. I don't care how gcc does it. I've never really used gcc. (Might even be harder to remember for people who used C a lot.) Is it more important to be consistent with gcc or with other D identifiers?

Plus, how many people want it to be linux instead of Linux? From what I've seen, it seems the majority would prefer it being Linux.

April 16, 2009
On Thu, Apr 16, 2009 at 1:08 AM, Jordan Miner <jminer2613@nospam.students.pcci.edu> wrote:
> Walter Bright Wrote:
>
>> Because gcc on linux predefines "linux", not "Linux".
>
> Please change the version identifier from linux to Linux.
>

I realise I probably did my part to spike this discussion.

However, given the complaints Walter got from adding the Posix identifier, removing "linux" is obviously a really bad idea.

But I must say I think "Linux" should be added, and "linux" be there for legacy reasons, like "darwin" I guess.

-Tomas
April 16, 2009
Tomas Lindquist Olsen, el 16 de abril a las 10:46 me escribiste:
> On Thu, Apr 16, 2009 at 1:08 AM, Jordan Miner <jminer2613@nospam.students.pcci.edu> wrote:
> > Walter Bright Wrote:
> >
> >> Because gcc on linux predefines "linux", not "Linux".
> >
> > Please change the version identifier from linux to Linux.
> >
> 
> I realise I probably did my part to spike this discussion.
> 
> However, given the complaints Walter got from adding the Posix identifier, removing "linux" is obviously a really bad idea.
> 
> But I must say I think "Linux" should be added, and "linux" be there for legacy reasons, like "darwin" I guess.

This seems like a reasonable tradeoff, issuing a deprecation warning when the legacy version identifiers are used can be a good idea too, so people can update the code eventually and the redundant identifiers can be removed in the future.

-- 
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 20, 2009
Tomas Lindquist Olsen Wrote:

> On Thu, Apr 16, 2009 at 1:08 AM, Jordan Miner <jminer2613@nospam.students.pcci.edu> wrote:
> >
> > Please change the version identifier from linux to Linux.
> >
> 
> I realise I probably did my part to spike this discussion.
> 
> However, given the complaints Walter got from adding the Posix identifier, removing "linux" is obviously a really bad idea.
> 
> But I must say I think "Linux" should be added, and "linux" be there for legacy reasons, like "darwin" I guess.
> 
> -Tomas

Yes, I definitely agree. By "change", I meant:

- Add Linux as an identifier and deprecate linux.
- Then, after a long enough time for everyone to switch to using Linux, remove linux.