I have a use case for generalizing using
to support another attribute: @available
. For example, it could be useful to be able to write using @available(macOS, unavailable)
and have that apply to all the top-level declarations in a file that is dedicated to code that should be unavailable on macOS. I can also imagine the need for this arising more often if the language were to support custom availability domains.
19 Likes