> On Oct 19, 2016, at 12:21 PM, Rob Mayoff via swift-evolution 
> <[email protected]> wrote:
> 
> On Wed, Oct 19, 2016 at 10:47 AM, plx via swift-evolution 
> <[email protected] <mailto:[email protected]>> wrote:
> In any case, I’d specifically hate to lose these:
> 
> - approximate equality: ≈
> - set operations: ∩, ∪ 
> - set relations: ⊂, ⊃, ⊄, ⊅, ⊆, ⊇, ⊈, ⊉, ⊊, ⊋
> - set membership: ∌, ∋, ∈, ∉
> - logical operators: ¬, ∧, ∨
> 
> I'd add ≤ ≥ ≠ to that set. 

I have production code that uses ± and ≈.

As with all operator overloads, there is room for abuse — but I’ve been using 
these operators to mean what it looks like they should mean, and am very 
pleased with the readability benefits.

At the very least, Swift ought to support operators using symbols from the 
Unicode blocks called “Mathematical Operators” and “Supplemental Mathematical 
Operators.”
https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode 
<https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode>

It’s right there in the name!™

Cheers, P



_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to