[swift-evolution] [swift-evolution-announce] [Review] SE-0155: Normalize Enum Case Representation

Matthew Johnson matthew at anandabits.com
Sat Feb 18 15:08:01 CST 2017


> On Feb 18, 2017, at 2:55 PM, Daniel Duan <daniel at duan.org> wrote:
> 
>> 
>> On Feb 18, 2017, at 8:47 AM, Matthew Johnson via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> 
>>> 	• What is your evaluation of the proposal?
>> 
>> +1.  I am extremely confident that this is the right direction to go in.
>> 
>> I really like Brent’s idea for allowing us to distinguish the parameter label from what he calls the “internal name”.  
>> 
>> In the value subtyping manifesto I recently posted I showed how we can assign a unique type to each enum case which is a subtype of the enum itself.  The “internal name” Brent mentions would be the name of the stored property holding the value if that idea were introduced in the future.  It has value beyond just documentation and autocompletion.
>> 
> 
> Intriguing! I wish I had read this before I replied to Brent’s. Would it be better to include the internal name addition in the subtyping proposal? 

Yes, I will update it to reflect this as soon as I have a chance.  

Keep in mind that the value subtyping manifesto is not a proposal or proposal draft.  It is intended to be a map of possible future proposals which would need to be specified in more detail.  If you think any of the topics in that manifesto might be relevant to consider in Swift 4 now that we’re in phase 2, please reply to that thread.  I’d love to hear your feedback!

> 
>>> 	• Is the problem being addressed significant enough to warrant a change to Swift?
>> 
>> Yes.  Several years of experience with Swift are showing that there are many reasons for this to change.
>> 
>>> 	• Does this proposal fit well with the feel and direction of Swift?
>> 
>> Very much so.
>> 
>>> 	• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
>> 
>> I have not.  The approach Swift takes to compound names is unique in my experience and is a very nice design.
>> 
>>> 	• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>> 
>> In-depth study.
>> 
>>> 
>>> More information about the Swift evolution process is available at https://github.com/apple/swift-evolution/blob/master/process.md <https://github.com/apple/swift-evolution/blob/master/process.md>
>>> 
>>> Thank you,
>>> 
>>> John McCall
>>> Review Manager
>>> _______________________________________________
>>> swift-evolution-announce mailing list
>>> swift-evolution-announce at swift.org <mailto:swift-evolution-announce at swift.org>
>>> https://lists.swift.org/mailman/listinfo/swift-evolution-announce <https://lists.swift.org/mailman/listinfo/swift-evolution-announce>
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170218/debec8b7/attachment.html>


More information about the swift-evolution mailing list