[swift-evolution] Allowing Characters for use as Custom Operators

Chris Lattner clattner at apple.com
Fri Jan 8 13:26:09 CST 2016


> On Jan 7, 2016, at 9:49 PM, Jacob Bandes-Storch <jtbandes at gmail.com> wrote:
> 
> Some other languages provide special syntax to use a binary function as infix:
> 
> 
> Haskell:
>     foo a b    -- is equivalent to
>     a `foo` b
> 
> Mathematica:
>     Foo[a, b]  (*is equivalent to*)
>     a~Foo~b

Ok, then yes, introducing a magic syntax would be technically feasible (though not backticks, since they are used for something else).

This is still extremely unlikely to be accepted though.  Additional language complexity needs to pay for itself, and the win here is so small that it doesn’t seem worth it.

-Chris



More information about the swift-evolution mailing list