[swift-evolution] [Review] SE-0022: Referencing the Objective-C selector of a method
Erica Sadun
erica at ericasadun.com
Thu Jan 21 23:25:11 CST 2016
Okay, you know this was coming: let's Groff this thing.
How about #(line) where you can decouple the specific compiler implementation bits from the keyword bits without hardcoding support, enabling implementation of, for example, #(runcible) for future Swift compiler substitution logic.
-- E
> On Jan 21, 2016, at 10:19 PM, Chris Lattner <clattner at apple.com> wrote:
>
>
>> On Jan 21, 2016, at 9:17 PM, Erica Sadun <erica at ericasadun.com <mailto:erica at ericasadun.com>> wrote:
>>
>> +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.
>
> Yeah, I totally agree. Actually, the proper spelling would simply be #line - after all, there’d be no need to shout any more…
>
> -Chris
>
>
>>
>> -- E
>>
>>> On Jan 21, 2016, at 10:04 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org <mailto: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 <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/20160121/b586d34c/attachment.html>
More information about the swift-evolution
mailing list