> On Oct 19, 2016, at 11:17 PM, Jonathan S. Shapiro via swift-evolution > <swift-evolution@swift.org> wrote: > > On Wed, Oct 19, 2016 at 1:31 PM, David Waite via swift-evolution > <swift-evolution@swift.org <mailto:swift-evolution@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 .
I really liked Jonathan's suggestion that removed the distinction between operators and identifiers entirely. You could mark a one-argument function as postfix or prefix, and a two-argument function as infix and use them as a kind of pseudo keyword. -- E
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution