SE-0478: Default actor isolation typealias

I'll admit that I find the typealias to be an awkward way to write this, especially because of how weird nonisolated ends up being. I would personally prefer something like

using @MainActor

or

using nonisolated

I don't know if we'll someday find ourselves wanting other file-wide settings like this one, but if we do, it's not unlikely that they'll fit into this same basic design of using <some attribute or modifier>. Anything that can be thought of as a file-wide default will presumably have an attribute or modifier to specify or override that on a finer-grained basis. If @collapsible makes a specific declaration collapsible, it makes sense that using @collapsible at global scope would do that by default within the file, and that's basically what this means.

16 Likes