[swift-evolution] Request to add middle dot (U+00B7) as operator character?
Chris Lattner
clattner at apple.com
Thu Dec 17 17:50:18 CST 2015
> On Dec 17, 2015, at 2:35 PM, Radosław Pietruszewski via swift-evolution <swift-evolution at swift.org> wrote:
>
> Although I would personally never, ever want to do this, I see no reason why this character shouldn’t be allowed for an operator.
>
> The question is: if we are to touch this are and extend the Unicode ranges of characters allowed for operators, what else is missing? A wider proposal to fill in the blanks would probably make sense.
Right. I also agree that adding this specific character makes sense, and it is trivial to extend the set of characters supported:
https://github.com/apple/swift/blob/master/include/swift/AST/Identifier.h#L90
The question is: what is the right set of characters? It would be great for someone familiar with this space to dive in and try to rationalize it.
-Chris
> — Radek
>
>> On 17 Dec 2015, at 21:14, Ethan Tira-Thompson via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>> Hi swift-evolution,
>>
>> I wanted to use ‘·’ as a dot-product operator, but it’s not currently defined as an operator character. (rdar://problem/23930008 <rdar://problem/23930008> suggested I come here for comment.)
>>
>> Note that dot operator (⋅, U+22C5) is already available for operators and semantically appropriate, but Mac users can conveniently type option-shift-9 to get the middle dot which is a nice feature and consequently it’s more well-known. FWIW, we have U+00B6 (¶) already defined as an operator, this would extend its range by one.
>>
>> Thoughts?
>>
>> Thanks,
>> -Ethan
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
> _______________________________________________
> 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/20151217/6addfda5/attachment.html>
More information about the swift-evolution
mailing list