As as been pointed out in the past, why not make a leading dot mean static (including enum). This would be nice and consistent. <span></span><br><br>On Sunday, 3 April 2016, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matthew Johnson via swift-evolution<br>
<<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
><br>
>> On Apr 1, 2016, at 4:07 PM, Dave Abrahams via swift-evolution<br>
>> <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
>><br>
>> Douglas Gregor via swift-evolution<br>
>> <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
>>> Hello Swift community,<br>
>>><br>
>>> The review of SE-0036 "Requiring Leading Dot Prefixes for Enum Instance<br>
>>> Member Implementations" begins now and runs throughApril 5, 2016. The<br>
>>> proposal is available here:<br>
>>><br>
>>> <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md</a><br>
>>> Reviews are an important part of the Swift evolution process. All reviews<br>
>>> should be sent to the swift-evolution mailing list at<br>
>>><br>
>>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
>>> <<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a>><br>
>>> or, if you would like to keep your feedback private, directly to the<br>
>>> review manager. When replying, please try to keep the proposal link at<br>
>>> the top of the message:<br>
>>><br>
>>> Proposal link:<br>
>>><br>
>>> <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md</a><br>
>>> Reply text<br>
>>><br>
>>> Other replies<br>
>>> <<a href="https://github.com/apple/swift-evolution#what-goes-into-a-review-1" target="_blank">https://github.com/apple/swift-evolution#what-goes-into-a-review-1</a>>What<br>
>>> goes into a review?<br>
>>><br>
>>> The goal of the review process is to improve the proposal under review<br>
>>> through constructive criticism and, eventually, determine the direction<br>
>>> of Swift. When writing your review, here are some questions you might<br>
>>> want to answer in your review:<br>
>>><br>
>>> What is your evaluation of the proposal?<br>
>>> Is the problem being addressed significant enough to warrant a change to Swift?<br>
>>> Does this proposal fit well with the feel and direction of Swift?<br>
>>> If you have used other languages or libraries with a similar feature, how<br>
>>> do you feel that this proposal compares to those?<br>
>>> How much effort did you put into your review? A glance, a quick reading,<br>
>>> or an in-depth study?<br>
>>> More information about the Swift evolution process is available at<br>
>>><br>
>>> <a href="https://github.com/apple/swift-evolution/blob/master/process.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/process.md</a><br>
>>> <<a href="https://github.com/apple/swift-evolution/blob/master/process.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/process.md</a>><br>
>>> Thank you,<br>
>>><br>
>>> Doug Gregor<br>
>>><br>
>>> Review Manager<br>
>><br>
>> This proposal seems to me like it's failing to fix the underlying problem,<br>
>> which is that people don't understand the leading dot rules, and papering<br>
>> over the problem by making the rule less consisten, with different behavior<br>
>> for enums and other type-scoped (static/class) entities. It doesn't seem<br>
>> like a principled solution to me.<br>
><br>
> This proposal doesn’t change the leading dot rules at all. What it does<br>
> is make the rules for referencing static members *more* consistent than<br>
> they are now, removing the special case for enum cases.<br>
><br>
> "Enumeration cases are essentially static not instance type members.<br>
> Unlike static members in structures and classes, enumeration cases can be<br>
> mentioned in initializers and instance methods without referencing a<br>
> fully qualified type. This makes little sense. In no other case can an<br>
> instance implementation directly access a static member."<br>
><br>
> I believe at one point in Swift’s history all static members could be<br>
> referenced directly. This proposal seems like it is cleaning up a case<br>
> that was missed when that changed.<br>
<br>
I believe I misread the proposal and you are right.<br>
<br>
I do have reservations about leading dot syntax that are highlighted by<br>
this sentence in the proposal:<br>
<br>
A leading dot has become a conventional shorthand for "enumeration case"<br>
across the language.<br>
<br>
That isn't in fact what it means, and if we have to play into that<br>
misperception I think it indicates a bigger problem. But we can handle that<br>
outside of this review.<br>
<br>
>><br>
>> --<br>
>> -Dave<br>
>><br>
>> _______________________________________________<br>
>> swift-evolution mailing list<br>
>> <a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a><br>
>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
><br>
><br>
><br>
<br>
<br>
<br>
--<br>
-Dave<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote><br><br>-- <br>-- Howard.<br>