on Fri Jun 17 2016, Ben Rimmington <[email protected]> wrote:

> <https://swift.org/documentation/api-design-guidelines/#type-conversion>
>
>> **In initializers that perform full-width type conversions, omit the
>> first argument label**, e.g. `Int64(someUInt32)`
>
> OptionSet could add `init(_ rawValue: RawValue)` to reduce boilerplate:
>
>       struct FooOptions: OptionSet {
>           let rawValue: Int
>
>           static let bar = Self(0b01)
>           static let baz = Self(0b10)
>       }

Great idea; please submit a proposal!

-- 
-Dave

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to