[swift-evolution] RFC: didset and willset
matthew at anandabits.com
Fri May 20 20:17:29 CDT 2016
> On May 20, 2016, at 6:18 PM, Ricardo Parada <rparada at mac.com> wrote:
> If I remember correctly the property behaviors proposal it seemed that accessors such as willSet, didSet, willRead, etc. were being called. I look at them at the same level as instance methods, properties, etc. and should follow camelCase. Not to mention that I think they look so much better camelCase.
> When we start having accessors made up of three or more lowercase conjoined words we are going to realize what a bad choice it was to switch these to lowercase.
> I think they should stay camelCase. Please. :-)
I generally agree with you. Especially because I believe sooner or later we will regret all lowercase because we find that sometimes the best accessor names are a bit too long to be comfortable with all lowercase (even 3 or 4 short words would be uncomfortable in all lowercase IMO). I would at least like to see this get more discussion before it is settled.
> Sent from my iPhone
>> On May 20, 2016, at 4:59 PM, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
>> I do support Brent’s argument that keywords which syntactically appear in the same syntactic location as user-defined names should follow the same convention as those user-defined names. This means, for example, that dynamicType already has the correct case even though it is a keyword. I would like to see this exemption added to the proposal.
>> Also, with this in mind I would like to see more discussion about the naming convention the community prefers for user-defined behavior accessors (under the assumption that they will make it eventually). If we agree on lowercase for user-defined accessors (which is Chris’s stated preference) I support the change to willset and didset.
More information about the swift-evolution