|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 2021] New: version(linux) is inconsistent
http://d.puremagic.com/issues/show_bug.cgi?id=2021 Summary: version(linux) is inconsistent Product: D Version: 2.012 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: wbaxter gmail.com If the version for Windows is going to be capitalized, then the version for Linux needs to be capitalized too. I recommend deprecating version(linux) and adding the default version(Linux). By deprecate I mean just remove it from the documentation and allow it to gradually be forgotten. Maybe someone was under the impression that "Windows" is a proper name, but "linux" is not, however, Googling for "linux" turns up many many uses of the name capitalized. In particular sites that should know seem to capitalize it, like linux.org: http://www.linux.org/info/index.html -- Apr 20 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #1 from larsivar igesund.net 2008-04-21 16:40 ------- Also, uname gives Linux, which tends to be the source used for scripted and programmed checks for the OS. uname on FreeBSD returns freebsd for instance, which turns out to also be the version identifier for that OS in GDC. This would allow for things like ./gdc -fversion=`uname` -- Apr 21 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #2 from afb algonet.se 2008-04-21 17:49 ------- (In reply to comment #1)Also, uname gives Linux, which tends to be the source used for scripted and programmed checks for the OS. uname on FreeBSD returns freebsd for instance, which turns out to also be the version identifier for that OS in GDC. Apr 21 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #3 from wbaxter gmail.com 2008-04-21 18:41 ------- (In reply to comment #2)Anyway, the whole issue was brought up years ago (2005) and should be a WONTFIX. See for instance http://www.digitalmars.com/d/archives/digitalmars/D/37778.html#N37933 and http://www.digitalmars.com/d/archives/D/gnu/1208.html. Apr 21 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #4 from afb algonet.se 2008-04-22 01:30 ------- My point was just that "version(Windows)" and "version(Unix)" already have a consistent capitalization in the portable compiler. And "version(linux)" and "version(darwin)" and "version(cygwin)" and "version(freebsd)" and "version(solaris)" do too. -- Apr 21 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #5 from wbaxter gmail.com 2008-04-22 01:41 ------- I see. I agree that's a reasonable and well thought out way to make everything consistent. -- Apr 21 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Comment #6 from bugzilla digitalmars.com 2008-04-22 20:29 ------- As has been pointed out in the comments, "linux" is used because that is the way gcc on Linux defines it. There isn't any consistent way to do it, so might as well just use what the Linux programmers are used to using. -- Apr 22 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2021 ------- Comment #7 from wbaxter gmail.com 2008-04-22 20:48 ------- Still seems kind of silly to me. First because this is D -- why should a D user be expected to have any knowledge of how GCC usually behaves on Linux. And second because I think you'd be the first to agree that the way preprocessor symbols are defined in C/C++ is totally fubar and inconsistent. Why perpetuate a broken system? That said, the way GDC does it, as AFB pointed out, takes the lemon that is DMD version names, and makes lemonade, by repositioning "linux" as a subcategory of "Unix". It would definitely be nice if DMD would pick up this idea and add a "Unix" version. -- Apr 22 2008
|