On 2011-08-14 21:20, Jonathan M Davis wrote:
On Sunday, August 14, 2011 19:24:21 Vladimir Panteleev wrote:
On Sun, 14 Aug 2011 02:47:21 +0300, Jonathan M Davis<jmdavisp...@gmx.com>

wrote:
Personally, I'm
inclined to drop the Os enum along with the os and os_major and os_minor
variables, because I just don't think that we can get them to be correct
enough of generally useful enough to be worth having. It's too
OS-specific to
be trying to handle it in an OS-generic manner like that.

Looking at the code again, I noticed there's a Family enum, which seems to
me closer to what the OS enum should really be. I think Family should just
replace OS.

I don't agree that we should just drop version numbers. As I said before,
they can be useful for users. They can also be useful for programs that
care only about a certain OS family.

What do you think about this?

https://github.com/CyberShadow/phobos/blob/new-std-system/std/system.d

I'm not at all convinced that it makes any sense to try and handle OS version
numbers in a system-independent manner. You have to know what OS you're on for
them to mean anything, in which case, why try and handle them in an OS-
independent manner?

On Linux, the version number is probably pointless. It's the version number
for the kernel. Most programs won't care one whit about that. If they care
about a version number, odds are that it's the version number of some program
or library on the system that they're using, not the kernel. And in general,
if you care, you care when you compile, not when you run the program. I would
expect FreeBSD to be the same. I don't know about Mac OS X.

I think it makes sense to be able to get version information about Mac OS X. I would consider Windows XP, Vista and so on be similar to Mac OS X 10.5, 10.6.


--
/Jacob Carlborg

Reply via email to