For what it's worth, the decision to permit unmentioned OSs was very deliberate: it was born from experience with bringing up tvOS and finding that everybody who had checked for "iOS 9 or later" had unintentionally excluded tvOS. For this reason, Apple actually changed the Objective-C compiler so that availability for versions of iOS before tvOS existed would also be applied to tvOS unless explicitly marked unavailable.* The lesson we learned was that availability should not restrict new, unknown platforms like cukr's fridgeOS, and then because you can't tell if a particular file's code was written before or after the introduction of fridgeOS, that basically means availability should not restrict any OS that's not explicitly forbidden. That's what the
, * is supposed to mean at the end of the availability declartion: it's "and anything else", inspired by shell wildcard syntax.
That said, I can't think of any reason why adding an explicit
!macOS would be a problem, even if it's not something commonly needed. On the attribute form of availability it would expand into
@availability(macOS, unavailable) with no message; for
#available it would mark dead code. (We could even do a first-pass implementation using Michel's
macOS 9999.) We'd have to decide whether the compiler still required the code in the
if branch to be valid even though it was known-dead, but that would just need discussion.
* I don't actually remember if this is precisely what we did, but it was something like this. ("we" because I was at Apple at the time.)