digitalmars.D - Why is the "linux" version identifier all lowercase?
- Lars T. Kyllingstad (4/4) Jul 30 2011 http://d-programming-language.org/version.html#PredefinedVersions
- Jonathan M Davis (9/13) Jul 30 2011 Yeah. I keep screwing up and using version(Linux). To match the others, ...
- Michel Fortin (10/14) Jul 30 2011 Because Walter saw some code using "#ifdef linux" and thought it'd be
- Nick Sabalausky (13/15) Jul 30 2011 Because it's from the time when D/Phobos policy was to expect users know...
- Jesse Phillips (2/24) Jul 30 2011 It should probably just work for both lower and upper case. I doubt anyo...
- Walter Bright (2/4) Jul 30 2011 Because gcc's predefined macro is "linux".
- Nick Sabalausky (3/8) Jul 30 2011 If gcc defined a macro to jump off a bridge... ;)
- Brad Roberts (6/16) Jul 30 2011 Keep in mind that linux was first after windows and they were both all
http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase? It really should be "Linux" (see e.g. www.kernel.org). -Lars
Jul 30 2011
On Saturday 30 July 2011 09:05:04 Lars T. Kyllingstad wrote:http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase? It really should be "Linux" (see e.g. www.kernel.org).Yeah. I keep screwing up and using version(Linux). To match the others, it really should be version(linux), but so much code would break at this point if changed it that we can't just change it. We could add version(Linux), and since it's a standard version defined by the compiler, I guess that the compiler could deprecate it. Regardless, the fact that it's all lowercase when all of the others (except for unittest, none, and all) begin with an uppercase letter definitely causes bugs (for me at least). - Jonathan M Davis
Jul 30 2011
On 2011-07-30 09:05:04 +0000, "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> said:http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase? It really should be "Linux" (see e.g. www.kernel.org).Because Walter saw some code using "#ifdef linux" and thought it'd be helpful to use the same lowercase identifier in D to ease migration… or at least that's what I remember from last time this question was asked on the newsgroup. Personally I don't think it makes much sense. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Jul 30 2011
"Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> wrote in message news:j10hg0$2c11$3 digitalmars.com...http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase?Because it's from the time when D/Phobos policy was to expect users know where an identifier was borrowed from in order to know how to spell/capitalize it, instead of being internally consistent. Seriously. I remember NG discussions a while back about why the "linux" identifier was all-lower, and that's pretty much all it amounted to, much like the pre-2.054 std.string. Well, a combination of that and the language's irritating inability to distringuish between an "off" version and a mistyped version (although this particular argument hinged on the assumption that porting C to D is a more important use of D than writing new D code). Ok, so I'm biased on the matter ;)
Jul 30 2011
Nick Sabalausky Wrote:"Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> wrote in message news:j10hg0$2c11$3 digitalmars.com...It should probably just work for both lower and upper case. I doubt anyone would define their own identifier based on a case difference.http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase?Because it's from the time when D/Phobos policy was to expect users know where an identifier was borrowed from in order to know how to spell/capitalize it, instead of being internally consistent. Seriously. I remember NG discussions a while back about why the "linux" identifier was all-lower, and that's pretty much all it amounted to, much like the pre-2.054 std.string. Well, a combination of that and the language's irritating inability to distringuish between an "off" version and a mistyped version (although this particular argument hinged on the assumption that porting C to D is a more important use of D than writing new D code). Ok, so I'm biased on the matter ;)
Jul 30 2011
On 7/30/2011 2:05 AM, Lars T. Kyllingstad wrote:http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase?Because gcc's predefined macro is "linux".
Jul 30 2011
"Walter Bright" <newshound2 digitalmars.com> wrote in message news:j11hfi$10tv$1 digitalmars.com...On 7/30/2011 2:05 AM, Lars T. Kyllingstad wrote:If gcc defined a macro to jump off a bridge... ;)http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase?Because gcc's predefined macro is "linux".
Jul 30 2011
On Saturday, July 30, 2011 1:29:13 PM, Nick Sabalausky wrote:"Walter Bright" <newshound2 digitalmars.com> wrote in message news:j11hfi$10tv$1 digitalmars.com...Keep in mind that linux was first after windows and they were both all there was for a long long time. By the time the next OS support rolled around they were quite thoroughly baked in. Not impossible to change, but not sure worth changing either. It wouldn't be hard to argue that both linux and Linux should be defined, but.. still.On 7/30/2011 2:05 AM, Lars T. Kyllingstad wrote:If gcc defined a macro to jump off a bridge... ;)http://d-programming-language.org/version.html#PredefinedVersions Why is the "linux" version identifier all lowercase?Because gcc's predefined macro is "linux".
Jul 30 2011