Clay language

Max Samukha spambox at d-coding.com
Thu Dec 30 10:17:09 PST 2010


On 12/30/2010 07:08 PM, Steven Schveighoffer wrote:

>
> auto opAdd(Foo other)
>
> vs.
>
> auto opBinary(string op)(Foo other) if (op == "+")

For the latter not to look so intimidating, it can be shortened to:

auto opBinary(string op : "+")(Foo other)


More information about the Digitalmars-d mailing list