[swift-evolution] Beyond Typewriter-Styled Code in Swift, Adoption of Symbols

André Videla andre.videla at gmail.com
Fri Sep 1 13:18:11 CDT 2017

> Floating-point addition isn't associative, and integer addition as we define it in Swift isn't even total.
Interesting point, I have not thought of it. To be intellectually honest, enforcing semantics per operators is impossible anyway since the type system has no proof system. And even in Agda and Idris, proving semantics for every interface is such a hassle that most of them do not check things like associativity and commutativity.
If Swift had “one operator per semantic” it would be by convention which cannot be enforced and defeats the purpose of preventing unexpected behaviours.

> Anyway, we're not going to re-syntax string concatenation in the 5th major release of the language.

That’s to be expected. Rather, I was hoping for some discussion about why the current design has been chosen.

>  […] as well as to ask for ways to hide the one from the standard library.

That’s an excellent suggestion!

More information about the swift-evolution mailing list