<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 27, 2017, at 8:59 AM, Charlie Monroe 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 27, 2017, at 5:43 PM, Tino Heth &lt;<a href="mailto:2th@gmx.de" class="">2th@gmx.de</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=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class="">- runtime libraries for Swift 4</div><div class="">- all system frameworks will need to contain two variants - one compatible with Swift 4 and one with Swift 5. This is IMHO absolutely unmaintainable in the long run. For how long would you need to keep several versions of the framework around? What happens when Swift 6 comes along with another breaking changes? Would each system framework have 3 versions embedded?</div></div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">That's right. If the OS frameworks use Swift then either (1) you have to clone the framework stack for each Swift version, or (2) you have only one copy of the frameworks but frameworks and apps can't share their Swift objects or publish Swift API.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">The framework structure that Apple inherited from NeXT supports framework versioning, but *no frameworks use it*. It doesn't scale.&nbsp;</div></div></div></div></blockquote></div><div class=""><br class=""></div>sure, it's preferable to have a single version that works with all apps — but if it's technically possible to have one clone installed with the OS, isn't that better than one version for each app?<div class="">Managing several versions shouldn't be that hard (have a look at&nbsp;<a href="https://nixos.org/nix/" class="">https://nixos.org/nix/</a>).</div></div></div></blockquote></div><br class=""><div class="">It would mean for Apple (and others who'd distribute compiled frameworks) to maintain several code bases of the same framework given that they would need to maintain backward compatibility and hence wouldn't be able to use new language features, etc. It's IMHO not that much about the technical constraint of having multiple binaries within the framework bundle as much as maintaining the code in a way that would compile under all Swift versions you'd like to support.</div></div></div></blockquote></div><div class=""><br class=""></div><div class=""><div>If I understand things correctly, as long as the declarations for any new API features which depend on new <i class="">ABI</i> features are wrapped in "#if swift(&gt;= _relevant_version_goes_here_) … #endif” statements, the system frameworks could be one codebase that the runtime vender compiles to multiple targets, right? Because any code that relied on Swift 5’s shiny new, non-backwards compatible, generics feature (or whatever) simply wouldn’t exist in the runtime/stdlib that Swift 3 binaries are looking for? Or is this one of those things that works better in theory than it does in practice? Specifically, I don’t know if code that’s correct when compiled for Swift 3’s ABI is <i class="">always</i> still correct when it’s compiled for Swift 4/5/etc’s ABI. If it is, it seems like it’d make the task much easier... For each subsequent version of the ABI, we'd only need to test the parts of the stdlib that depend on the new ABI, since the parts that could be compiled for earlier ABIs would’ve already been tested when that version of the runtime/stdlib was compiled. At least, if it does actually work that way.</div></div><div><br class=""></div><div>I very much agree that only having to deal with one runtime and one version of the system frameworks is <i class="">clearly</i> the ideal, but I also think it’s important to have an accurate understanding of what it would really cost a vendor/organization to commit to supporting multiple versions.</div><div><br class=""></div><div>- Dave Sweeris</div></body></html>