Am 25. Mai 2016 um 03:07 schrieb Matthew Johnson via swift-evolution 
<swift-evolution@swift.org>:




On May 24, 2016, at 7:45 PM, Brent Royal-Gordon <br...@architechies.com> wrote:


I believe it was things like "+" and "-" for set union and subtraction, etc.


That, or &, |, and ^, by analogy with bitwise operators. It definitely came up 
during the SetAlgebra discussions. 


Another thread I guess I didn’t follow closely enough.  I think I agree with 
avoiding using unconventional operators for operations which already have 
conventional operators associated with them.  Maybe someday it will be easy 
enough to type unicode operators that it might be reasonable to think about 
using them.


Yes, there is precedent in other languages:
Ceylon uses "&" for type intersection (any<>) and "|" for type union (one<>), 
see http://ceylon-lang.org/documentation/1.2/tour/types/.
TypeScript does the same (see 
https://www.typescriptlang.org/docs/handbook/advanced-types.html).



-Thorsten
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to