myClass.add(something)(otherthings)(thisToo);
BCS
ao at pathlink.com
Wed Dec 10 08:31:47 PST 2008
Reply to Denis,
> On Wed, 10 Dec 2008 03:24:48 +0300, Jarrett Billingsley
> <jarrett.billingsley at gmail.com> wrote:
>
>> On Tue, Dec 9, 2008 at 7:00 PM, BCS <ao at pathlink.com> wrote:
>>
>>> final void add(T...)(T t)
>>>
>> If all the params are the same type, typesafe variadics are a more
>> efficient/less code-bloaty way to do it.
>>
> *And* allows overriding them!
>
Note the functionality that both solution provide is trivial. All the real
work gets done in the _add functions that /can/ be overridden.
More information about the Digitalmars-d-learn
mailing list