[swift-evolution] [swift-evolution-announce] [Review] SE-0098: Lowercase didSet and willSet for more consistent keyword casing
rparada at mac.com
Tue May 24 14:34:43 CDT 2016
> On May 24, 2016, at 2:07 PM, Chris Lattner <clattner at apple.com> wrote:
> Hello Swift community,
> The review of "SE-0098: Lowercase didSet and willSet for more consistent keyword casing" begins now and runs through May 30. The proposal is available here:
> * What is your evaluation of the proposal?
I strongly believe that these should NOT be renamed to lowercase conjoined. I anticipate these will become accessors when property behaviors are implemented in the future. Accessors are defined by the implementor of the property behavior and they feel like calling a method or function. They should be subject to lowerCamelCase, just like instance methods and properties.
In addition, lowercase conjoined does not look that good when you start having more than two words conjoined. On the other hand lowerCameCase is richer and I find it easier to read.
> * Is the problem being addressed significant enough to warrant a change to Swift?
This change is not necessary. I don’t at these as keywords specially knowing that accessors and property behaviors will be arriving in the future.
> * Does this proposal fit well with the feel and direction of Swift?
No. I think what’s wrong with this proposal is that is based on the assumption that willSet, didSet are keywords.
> * If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
In java for example, in an object-to-relational mapping framework, there are method hooks such as willRead() that are methods that get called when accessing properties of the object and makes sure the data is fetched from the database. In this case, willRead() is just a method in the object. I look at the willSet and didSet as playing similar roles.
> * How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
I’ve been following the discussions prior to the proposal and I’m now reading the responses to the proposal.
More information about the swift-evolution