We historically haven't had an equivalent of Clang's -Wc++98-compat to warn you when you're using a Swift-5.3-only feature, even when it's a relaxing of existing rules rather than an introduction of new syntax. The thought here has been that there's no reason to have one codebase work with multiple Swift compilers because of forward source compatibility and the ease of updating, but it's come up repeatedly in practice because of upgrade periods (such as Xcode betas) and because keeping an older version of Swift around is a pain. I don't think this specific proposal should be changed, but maybe a best-effort "warn on incompatible features" flag is worth designing.
5 Likes