OS versus Swift availability

This seems wrong to me, and more importantly it seems unsustainable. I know we’re getting off-topic here, but I really think OS-availability guarantees should only be used for OS-specific features, not for Swift language features.

We already have OS availability tests for macOS, iOS, tvOS, and watchOS. One can expect similar tests for all the multitudinous flavors of Linux, and Windows, and Android, and other operating systems, including future OSes that don’t exist yet on platforms which haven’t been invented.

It does not make sense to list every single OS on every single declaration added to the standard library.

Again, if we’re gating on capabilities of the OS itself, then these tests are probably unavoidable. But if we are gating on capabilities of the Swift runtime or standard library, then we really really ought to be using a single test for exactly that, which works on all platforms.

4 Likes