[swift-evolution] RFC: didset and willset

Chris Lattner clattner at apple.com
Fri May 20 01:10:16 CDT 2016

> On May 18, 2016, at 1:53 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
> Just some context:
> "We have a few conjoined keywords already (typealias, associatedtype, fallthrough).  In the discussion about these terms, we decided that these read best when all lowercase, because they are treated as atomic concepts by programmers"
> and
> "On it being a conjoined word, we agreed that the language is currently inconsistent (we have typealias, fallthrough, but also didSet/willSet and @warn_unused_result) and that we should clean it up.  Conjoined feels like the right direction to go for this case.  We didn’t discuss it but IMO, didSet should get lowercased as well.”

FWIW, I still agree with the logic you quote.  These seem like they should be lowercase to me.

Although it is not literally the case, programmers will treat them effectively as though they are keywords in the language, and that is what matters.  When we introduce property behaviors, the surface level syntax for this sort of thing is likely to remain the same, and it therefore stands to reason that the behavior “accessors” would follow the same convention as keywords. 


More information about the swift-evolution mailing list