Thoughts on std.system.OS

Jonathan M Davis jmdavisProg at gmx.com
Sat Aug 13 17:23:01 PDT 2011


On Saturday, August 13, 2011 20:00:13 Michel Fortin wrote:
> On 2011-08-13 16:58:41 +0000, Jonathan M Davis <jmdavisProg at gmx.com> said:
> > Well, since the OS is Mac OS X, not Mac OS (at least so far as
> > versioning in D goes), then presumably 10.6.8 would have the major
> > number 6 and the minor number 8.
> 
> But that won't follow Apple nomenclature. The gestalt constants for
> getting those three numbers are: gestaltSystemVersionMajor,
> gestaltSystemVersionMinor, and gestaltSystemVersionBugFix. I don't
> think it'd be wise to shift the names just because Apple marketing has
> decided to stall the major number for a decade or more.

My conclusion to all of this is that trying to have os, os_major, and os_minor 
versions like this is a mistake. It just varies too much from OS to OS. We may 
want to provide functionality which is OS-specific to do this sort of thing, 
but handling it in an OS-generic manner doesn't seem reasonable to me given 
the differing situations between OSes.

- Jonathan M Davis


More information about the Digitalmars-d mailing list