Moving away from the compiler, I like the leading dot for the programmer to distinguish static and instance members. The 'missing' receiver natural means static to me. <br><br>On Tuesday, 5 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"><br>
on Mon Apr 04 2016, Joe Groff <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
<br>
>> On Apr 4, 2016, at 12:51 PM, Dave Abrahams <<a href="javascript:;" onclick="_e(event, 'cvml', 'dabrahams@apple.com')">dabrahams@apple.com</a>> wrote:<br>
>><br>
>><br>
>> on Mon Apr 04 2016, Joe Groff <jgroff-AT-apple.com> wrote:<br>
>><br>
><br>
>>>> On Apr 4, 2016, at 11:44 AM, Dave Abrahams <<a href="javascript:;" onclick="_e(event, 'cvml', 'dabrahams@apple.com')">dabrahams@apple.com</a>> wrote:<br>
>>>><br>
>>>><br>
>>>> on Mon Apr 04 2016, Joe Groff <jgroff-AT-apple.com> wrote:<br>
>>>><br>
>>><br>
>>>>>> On Apr 4, 2016, at 11:05 AM, Dave Abrahams via swift-evolution <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
>>>>>><br>
>>>>>><br>
>>>>>> on Mon Apr 04 2016, Erica Sadun <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> asked:<br>
>>>>>><br>
>>>>><br>
>>>>>>> Can you ping me off-list or in another thread and explain what the<br>
>>>>>>> issues are?<br>
>>>>>><br>
>>>>>> All of the following make me uncomfortable with our leading-dot thang:<br>
>>>>>><br>
>>>>>> * The rules for lookup don't seem obvious to me. I admit this is very<br>
>>>>>> personal/subjective.<br>
>>>>>><br>
>>>>>> * There is some evidence that people think it means something it doesn't<br>
>>>>>> (“enum case”), as mentioned in SE-0036. That suggests it is a<br>
>>>>>> confusing feature. That confusion may be fairly harmless so far, but<br>
>>>>>> still.<br>
>>>>>><br>
>>>>>> * The dot doesn't seem to buy enough to be worth the complexity it adds<br>
>>>>>> to the language; why not just let those names be looked up without the<br>
>>>>>> dot? You can always disambiguate with full qualification if you have<br>
>>>>>> to.<br>
>>>>><br>
>>>>> Making every unqualified reference context-dependent would be<br>
>>>>> impractical. `foo.bar(bas)` would become an exponential search to find<br>
>>>>> a contextual type containing a `foo` which has a `bar` member that can<br>
>>>>> accept an type containing a `bas` member.<br>
>>>><br>
>>>> I don't think I'm talking about making every unqualified reference<br>
>>>> context-dependent. When I have a context that demands an instance of a<br>
>>>> particular enum type, I think it's reasonable to look up the names in<br>
>>>> the enum without qualification, and I strongly question the value of<br>
>>>> leading-dot syntax for general static member lookup.<br>
>>><br>
>>> Therein lies the rub—*any* context an unqualified name can appear in<br>
>>> could potentially demand an instance of a particular enum type, until<br>
>>> the type checker rules that out. Limiting the behavior to enums<br>
>>> doesn't simplify the implementation.<br>
>><br>
>> I'm afraid I don't understand how that's a serious problem yet.<br>
><br>
> Right now, we limit the contextual lookup to places where it's<br>
> syntactically asked for, using the leading dot. Without the leading<br>
> dot, we'd have to extend it to every unqualified name, which makes it<br>
> much more likely you'll fall into problematic cases.<br>
<br>
I don't know how to evaluate whether that likelihood is a problem in<br>
practice, or not, though.<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>