On Apr 8, 2016, at 12:28 PM, Антон Жилин <[email protected]> wrote: > The question 4 (`prefix operator ! { }` or `prefix operator !`) seems dead > simple, because if we need to declare precedence group in body of infix > operators, then other operators should have it for consistency. > > It's not. > I suggest an alternative syntax for that: > infix operator <> : Comparative > > Colon immediately after the operator may not look the best, but it's the only > disadvantage I can find. It looks like inheritance and has similar meaning.
I agree, this is an nice approach. You’re basically saying that the <> operator is a member of the set of Comparative operators, thereby “inheriting” its precedence behaviors. -Chris
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
