[swift-evolution] [Review] SE-0022: Referencing the Objective-C selector of a method

Erica Sadun erica at ericasadun.com
Thu Jan 21 23:17:59 CST 2016


+1 to setting __LINE__ (and friends) free of their unsightly upper snake case. They look like boa constrictors trying to digest a fully-swallowed keyword.

-- E

> On Jan 21, 2016, at 10:04 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Jan 21, 2016, at 4:13 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>>>> 
>>>> I think that #selector is workable and fits into the model - it would be simple to implement and not cause unnecessary complexity in the implementation.
>>>> 
>>>> That said, I’m in favor of x.selector, or #selector(x).  The former seems more syntactically elegant if it is practical.
>>> 
>>> The latter gives us easy extensions like
>>> 
>>> 	#selector(getter: MyType.property)
>>> 	#selector(setter: MyType.property)
>>> 
>>> #selector is sorta growing on me.
>> 
>> +1 from me. At this point in Swift's evolution, the # feels like "invoke compiler substitution logic here”.
> 
> I agree.  Along those lines, we could consider renaming __LINE__ and friends to #LINE
> 
> -Chris
> _______________________________________________
> 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/20160121/25147213/attachment.html>


More information about the swift-evolution mailing list