[swift-evolution] [Review] SE-0018 Flexible Memberwise Initialization

Matthew Johnson matthew at anandabits.com
Wed Jan 6 19:17:33 CST 2016


> On Jan 6, 2016, at 7:05 PM, David Owens II via swift-evolution <swift-evolution at swift.org> wrote:
> 
> -1 for me.
> 
>> On Jan 6, 2016, at 2:47 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Hello Swift community,
>> 
>> The review of "Flexible Memberwise Initialization" begins now and runs through January 10th. The proposal is available here:
>> 
>> 	https://github.com/apple/swift-evolution/blob/master/proposals/0018-flexible-memberwise-initialization.md <https://github.com/apple/swift-evolution/blob/master/proposals/0018-flexible-memberwise-initialization.md>	
>> 
>> 	* What is your evaluation of the proposal?
> 
> I’m unconvinced that the value is warranted for the complexity that is being brought to the table. Couple this with the fact that it’s very easy to accidentally make breaking changes by simply re-ordering your members, adding new ones, or even assigning a default value. I just find it far too fragile.
> 
>> 	* Is the problem being addressed significant enough to warrant a change to Swift?
> 
> I don’t think so. 
> 
>> 	* Does this proposal fit well with the feel and direction of Swift?
> 
> I suppose. However, it has a lot of impact on the resiliency of APIs, so I’d want to delay this feature until those issues are worked out first. The other concern is there is a lot of magic involved, especially when some of the future enhancements are looked at.
> 
>> 	* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
> 
> I’ve used tools to do this in past, such as MACROs or snippet-like items. Those seemed to be more useful and less constrained. Also, I make use of Swift’s implicit initializers for structs for internal code. While that is nice, I’ve not been convinced that moving this functionality to public is a good thing.

I know this won’t influence your opinion David, but I want to make it clear to any other readers: this proposal does not introduce any implicit public initializers.  It simply enhances the existing memberwise initializer functionality by allowing more control and making it available to classes as well as structs.

> 
>> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> 
> I’ve been following the iterations and partaking in some of the conversations.
> 
> -David
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160106/a6a582f7/attachment.html>


More information about the swift-evolution mailing list