> On Apr 6, 2016, at 9:27 AM, Jordan Rose via swift-evolution 
> <[email protected]> wrote:
> 
> 
>> On Apr 5, 2016, at 0:55 , Radosław Pietruszewski via swift-evolution 
>> <[email protected]> wrote:
>> 
>> As others noted:
>> 
>> * the ability to say .min, .max, .blackColor(), etc is extremely useful. 
>> Swift would be a lot worse off if only enum cases got their enum types 
>> inferred, and for any other static member of a type I would have type the 
>> fully qualified name
>> * the leading dot disambiguates the reference for the compiler **and for the 
>> reader**. I don’t have to guess if I’m not referencing something local, or 
>> explicitly disambiguate when needed. I just say, “.foo”, and it’s clear.
>> * I disagree that the rules of lookup are confusing. The feature is poorly 
>> documented in official guides, but it seems pretty straightforward to me. 
>> For any context implying T, .foo means a static member T.foo. Like you said, 
>> could be subjective ¯\_(ツ)_/¯
> 
> I strongly agree with all of these points, especially the second.

+1 to all these points.  Also, in Swift 3, “.blackColor()” becomes “.black()”.

-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to