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.
/** 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 {
...
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.
The story I heard[1] was that Microsoft skipped 9 because people used to check for "Windows 9" prefix string to identify 95 and 98:
[1] https://www.reddit.com/r/technology/comments/2hwlrk/comment/...
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...
1 reply →
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.