3 ms·
The Swift 4 compiler has a Swift 3.2 mode that is 99.9% source compatible with Swift 3.x. Further you can link 3.2 and 4.0 binaries together. This allows a phas
by xenadu02 9y ago
The Swift 4 compiler has a Swift 3.2 mode that is 99.9% source compatible with Swift 3.x. Further you can link 3.2 and 4.0 binaries together. This allows a phased upgrade approach that was not possible in earlier releases.
Swift 5 is about having a stable binary interface so you can link against pre-compiled code going forward. In other words a Swift 6/7/8 binary can link against one compiled with Swift 5.
The bar for source breaking changes is also much higher than the already high bar in Swift 4. We may not see any source breaking changes in Swift 5.
- kibwen 9y ago> Further you can link 3.2 and 4.0 binaries together. Do you have a source for this? This would imply ABI stability, which isn't being promised until Swift 5.
- slavapestov 9y agoSwift "3.2" and 4.0 are really the same compiler, run with -swift-version 3 and -swift-version 4 flags, respectively.
- kibwen 9y agoI get that they're the same command-line tool, but as a bystander that doesn't tell me whether it's implemented underneath as two separate incompatible compilers that are toggled between with a flag. And even if it's a single compiler with mostly shared components, that doesn't have to imply that the binaries that are produced are ABI-compatible between the two. I'm not implying that I cannot believe that this use-case will work, only asking for some assurance from the compiler devs that it does.
- lyinsteve 9y ago-swift-version 3 really just turns on some different paths through the parser and type checker to allow previously-valid Swift 3 code to survive to code generation time. They're both compatible
- slavapestov 9y ago> I'm not implying that I cannot believe that this use-case will work, only asking for some assurance from the compiler devs that it does. You have my assurances that it works ;-)