[swift-evolution] [Proposal] Refining Identifier and Operator Symbology

Jonathan S. Shapiro jonathan.s.shapiro at gmail.com
Thu Oct 20 00:17:12 CDT 2016


On Wed, Oct 19, 2016 at 1:31 PM, David Waite via swift-evolution <
swift-evolution at swift.org> wrote:

> The problem is that this set does not just contain mathematical operators,
> but includes among other examples  \u2205 (Empty Set) and \u221E (infinity).
>

Both of which are perfectly reasonable symbols to include.

>From a UAX31 standpoint, the practical problem is that operator symbols are
going to get defined largely in terms of the existing symbol category. It's
not going to be perfect. Traditionally, Unicode standards have been defined
in terms of properties rather than blocks. I do think its worth asking
whether "mathematical symbols" is too broad and we may wish to consider
only "mathematical operators". I'll take that up with Mark.

This is one reason that I was briefly exploring whether operator
identifiers could actually be used as identifiers generally. The answer
boils down to: "not if operator symbols admit . (period)". Unfortunately,
the existing Swift standard library is *already* using .

Even if we were prepared to slog through all of the math symbols one by one
and decide which ones are operators, I'm not convinced that the UAX31
effort would be prepared to adopt the result. Part of the problem is that
it's not just about singleton code points. It's about codepoints that get
combined into operator identifiers that are then interpreted as operators.


Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161019/d2529591/attachment.html>


More information about the swift-evolution mailing list