@OptionSet interface is still missing

@OptionSet was added to Foundation at the same time macros were introduced, and after all this time there have been no API changes.

It's even documented in Swift's official documentation.

Yet to this day it still cannot be used directly

I have to manually add the interface for it to compile.

Why is that?

1 Like

@OptionSet has not been officially added to Swift. All such additions to Swift would be reviewed as an Evolution proposal and there is no such proposal. (This has nothing to do with Foundation.)

1 Like

IIRC, @OptionSet was added as an example as part of the original macro proposal, but then removed because its addition hadn't been reviewed. But it got most of the way through Apple's beta process before that happened, so all the docs were generated and published, but not removed after it was no longer available.

2 Likes