Monday, September 8, 2014

Raw​Option​Set​Type

Mattt Thompson:

When interacting with frameworks like Foundation in Swift, all of those NS_ENUM declarations are automatically converted into an enum—often improving on the original Objective-C declaration by eliminating naming redundancies […] Unfortunately, for NS_OPTIONS, the Swift equivalent is arguably worse.

[…]

Compared to the syntactically concise enum declaration, RawOptionsSetType is awkward and cumbersome, requiring over a dozen lines of boilerplate for computed properties.

Comments RSS · Twitter

Leave a Comment