Michael Long
Aug 16, 2023

--

If your UnfairLock class conformed to NSLocking you'd get withLock { ... } for free.

The problem with property wrappers such as this is that nesting them is still an issue.

Finally, while it may be used in the standard library, the underscore prefix (and lack of documentation) indicates that Apple may decide to switch things up at any time.

Interesting find, though!

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet