<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Since the corelibs version of Foundation is meant to match the Darwin version (for the most part), this is more a question for the owners of the Darwin Foundation framework (and overlay). Fortunately, they're the same people maintaining the corelibs port (Tony Parker, Philippe Hausler, and others), and they have the freedom to make such decisions without going through the full Swift evolution process.</div><div class=""><br class=""></div><div class="">Discussion is fine, of course, but you should bring this up with Tony or Philippe on the swift-corelibs-dev list.</div><div class=""><br class=""></div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 26, 2016, at 3:32, Robert S Mozayeni via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello.</div><div class=""><br class=""></div><div class="">I’ve recently forked swift-corelibs-foundation and implemented Comparable for&nbsp;NSOperatingSystemVersion.</div><div class=""><br class=""></div><div class="">What’s the point of this? Well, in the words of a friend, "It’s a value type with a clear ordering, why not?”.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I have also added a new initializer that allows something like</div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre-wrap; background-color: rgb(234, 255, 234);" class="">NSOperatingSystemVersion(10,11,4)</span></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre-wrap; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class="">instead of requiring</div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre-wrap; background-color: rgb(234, 255, 234);" class="">NSOperatingSystemVersion(</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre-wrap; background-color: rgb(234, 255, 234);" class="">majorVersion: 10, minorVersion: 11, patchVersion: 4)</span></div><div class=""><br class=""></div><div class="">Not only is this new initializer <i class="">easier</i>&nbsp;<i class="">to type</i>, but it also much clearer, especially when one is quickly scanning through code.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">My changes:&nbsp;<a href="https://github.com/rsmoz/swift-corelibs-foundation/commit/e3db7ae2d7f4ba27ae5597e157b41a4b34def468" class="">https://github.com/rsmoz/swift-corelibs-foundation/commit/e3db7ae2d7f4ba27ae5597e157b41a4b34def468</a></div><div class=""><br class=""></div><div class="">Also, the Version struct in&nbsp;swift-package-manager has an extension for Comparable, as well as concise initializer:</div><div class=""><a href="https://github.com/apple/swift-package-manager/blob/39fdccc74fcb11bc0a352b73fb7e656ba6843ff4/Sources/PackageDescription/Version.swift#L23" class="">https://github.com/apple/swift-package-manager/blob/39fdccc74fcb11bc0a352b73fb7e656ba6843ff4/Sources/PackageDescription/Version.swift#L23</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Tests:&nbsp;<a href="https://github.com/rsmoz/swift-corelibs-foundation/commit/db44f29e42f29ad0fe35f69ac83d853453c77bc6" class="">https://github.com/rsmoz/swift-corelibs-foundation/commit/db44f29e42f29ad0fe35f69ac83d853453c77bc6</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I’d like to hear your opinions on my changes. For instance, do you think implementing Comparable for&nbsp;NSOperatingSystemVersion would best be done in an extension? That’s how SwiftPM does it.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Best,</div><div class="">Robert Mozayeni</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>