Comment by chuckadams

8 days ago

It's a story all right, but that's all it is. Windows has a GetVersion function that returns a struct of major/minor/build, and they're all ints. That's how you've always checked for versions, with older versions checking against a single int that contained both major/minor.

Microsoft had no reason to support blatantly stupid development practices that no one ever actually did. They were trying to avoid brand confusion with the consumer, because even people who know about versions will still do a mental double take at seeing "Windows 9", expecting another digit. The confusion might not last long, but it still detracts from the brand.

> no one ever actually did.

There is an example further down that thread:

https://www.reddit.com/r/technology/comments/2hwlrk/comment/...

https://issues.jenkins-ci.org/secure/attachment/18777/Platfo...

    /** Performs computation and returns the result, or throws some exception. */
    public HashSet<String> call() throws Exception {
        final String arch = System.getProperty("os.arch");
        String name = System.getProperty("os.name").toLowerCase();
        String version = System.getProperty("os.version");
        if (name.equals("solaris") || name.equals("SunOS")) {
            name = "solaris";
        } else if (name.startsWith("windows")) {
            name = "windows";
            if (name.startsWith("windows 9")) {
                if (version.startsWith("4.0")) {
                    version = "95";
                } else if (version.startsWith("4.9")) {
                    version = "me";
                } else {
                    assert version.startsWith("4.1");
                    version = "98";
                }
            } else {
    ...

  • I suppose Java didn't offer too many alternatives to checking the OS version the standard way, but I really have a hard time imagining MS bending over backwards to support that approach on that platform. There wasn't even a need to check for the "windows 9", the code was already checking for a Windows platform and would have worked the same without it. Avoiding confusion in the minds of the end users is still the most plausible explanation to me.

Microsoft has a history of trying to avoid breaking older software with new Windows releases. To do that, they definitely do need account for how people are actually coding things in their software rather than just what they've documented as the way to do things.

The string check makes a lot of sense when you consider software written in languages like Java or Python rather than something that's coded directly against the OS APIs. In those cases you would get strings back with the OS name which of course is going to lead to many people just doing taking the simplest route of string matching.