[swift-evolution] Request to add middle dot (U+00B7) as operator character?

Ross O'Brien narrativium at gmail.com
Thu Dec 17 19:50:37 CST 2015

I've been wanting to ask about how the Swift team decided to split the
Unicode characters between identifier characters and operator characters
for over a year now.
Playing cards and dominoes can be used as identifier characters. Chess
pieces are operator characters. ๐Ÿ‚ก โ™”
<https://en.wikipedia.org/wiki/%E2%99%94> ๐Ÿ„ could be a legal expression in
Swift. I don't know why.
There's a proposal in swift-evolution right now for && and || to be
replaced by 'and' and 'or'. The unicode rules mean that it's not permitted
to create a custom operator 'and' - unless you spell it in Braille.
(Technically Unicode doesn't map Braille symbols to letters, but it's true
as far as it goes).
Care to elaborate on the rationale for this? :)


On Fri, Dec 18, 2015 at 12:19 AM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:

> On Dec 17, 2015, at 4:15 PM, Greg Parker via swift-evolution <
> swift-evolution at swift.org> wrote:
> On Dec 17, 2015, at 12:14 PM, Ethan Tira-Thompson via swift-evolution <
> swift-evolution at swift.org> wrote:
> I wanted to use โ€˜ยทโ€™ as a dot-product operator, but itโ€™s not currently
> defined as an operator character. (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.
> IHNTA, IJWTS "๐Ÿถ is an identifier but โšฝ๏ธŽ is an operator, according to
> Swift's current rules.โ€
> Iโ€™m not sure what the initialisicms stand for, but any proposal that
> breaks:
> let ๐Ÿถ๐Ÿฎ = "moof"
> will not be tolerated.  :-) :-)
> -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/20151218/bf970b9c/attachment.html>

More information about the swift-evolution mailing list