[swift-evolution] SE-0030 Property behaviours
Антон Жилин
antonyzhilin at gmail.com
Thu Feb 25 07:14:23 CST 2016
An idea for future directions (quite obvious, but not yet discussed).
Extract current computed properties into a library behaviour, that is,
convert
var x: Int {
get { ... }
set { ... }
}
To
@computed var x: Int {
get { ... }
set { ... }
}
This is closely related to discussion of removal of `if let x = ...` in
favor of `if let x? = ...`
Intentions are the same: remove extra entities and simplify grammar.
What do we do with read-only computed properties? Defaulting set accessor
to fatalError() is not really a solution.
P.S. The initial email was blocked by Mailman, don't respond to it, please.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160225/470de33a/attachment.html>
More information about the swift-evolution
mailing list