Default swift language version for a given toolchain version

Then I think we are on the same page too, I got the impression that it wouldn’t be enough to just edit the tools version in a package manifest to get the new language mode, which would have been a bit unexpected.

I can understand the pragmatism of not wanting to change the default version when using the compiler directly, but that’ll mean then that version 5 is basically forever the default? Swift toolchain version 10 would then still default to swift language version 5 with the same argument - to not break any old code out there.that will over time be stranger and stranger…

Perhaps should start issuing a warning if the language version isn’t specifically specified from the command line? Or as a fix-it if trying to use new features (which might be hard?). Just seems like a nice experience for someone who wants to build a single file to test the language out would get the version of the language that is current and not a “random” version from years ago which might not then compile?

6 Likes