Hopefully not-too-obvious observation
Marco Leise
Marco.Leise at gmx.de
Fri Jul 19 05:19:15 PDT 2013
Am Wed, 17 Jul 2013 22:50:09 -0400
schrieb Jerry <jlquinn at optonline.net>:
> Hi folks,
>
> I was looking at writing a hash-like class with a specific operator and
> disliking the syntax of:
>
> T opBinary(string op)(U key) if (op == "in") {}
>
> When it occurred to me that it could be simply tightened up as:
>
> T opBinary(string op : "in")(U key) {}
>
> Any thoughts? Is this bad style?
>
> Thanks
> Jerry
I write it like that, too. It's more readable with the "in"
closer to the method name.
--
Marco
More information about the Digitalmars-d
mailing list