I was always wondering why this still not available in Swift.
Int.+(lhs:rhs:)
Int.+=
Int.==
// etc.
In some function that expect a function with the signature (T, T) -> T we can easily pass an infix operator function + if T is known to be a type with such an operator.
Parsing is pretty much the only reason I know of. I think we'd have to always parenthesize it in case someone defines .+ as a postfix operator that applies to types (even though you're supposed to write that Int.self.+), but accepting the parenthesized form seems like it'd be a fairly non-controversial evolution proposal, and it's probably not too hard for someone to implement.
Another possible spelling: Int.`+` and Int.`.+`. I might like this one even better because it doesn't even really need any new rules; it just says it's okay to use backticks with operators in member position, and then you've got an escaped identifier like anywhere else.
Until now, they’ve both been usable in all the same ways, so would it confuse clients that Int.≤ compiles but Int.≥ doesn’t? What if they don’t know where in the source to look for the declaration? Xcode doesn’t show Quick Help or Jump to Definition for operators, and even if it did, something that doesn’t compile cannot be looked up.
My 2c: backticks are better than parentheses because everyone is already familiar with them as a way to "escape" problematic tokens. I doubt anyone who tried to write Int.+ would reach for parentheses as a solution before trying backticks.
This is completely off-topic here. Furthermore I would be against such a method because it hurts readability from my point of view. If you like it, you can easily define it yourself in your own code base:
I personally don‘t think it‘s worth considering of it‘s addition to the stdlib compared to methods like ˋisEqual(to:)ˋ or ˋisNotEqual(to:)ˋ but this is again off-topic to this thread.