[swift-evolution] Two-for-Tuesday: Resettable Properties
Michel Fortin
michel.fortin at michelf.ca
Thu Mar 17 08:45:50 CDT 2016
Le 15 mars 2016 à 9:49, Patterson, Jason via swift-evolution <swift-evolution at swift.org> a écrit :
> There were a few ideas here but I ultimately settled on a new `set?`
> operator. The proposal then details the usage and ramifications of
> such a change. For example, the getter would continue to return `T`
> while the type of `newValue` available in the setter becomes a `T?`.
> There's a corresponding change to willSet clauses.
That proposal is well-written and the syntax is simple to understand.
I think I like this better than the out-of-band `reset` proposed as part of property behaviors. I've never been a fan of those out of band functions.
--
Michel Fortin
https://michelf.ca
More information about the swift-evolution
mailing list