Explicitly passing `this` to methods
Tomer Filiba via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 19 05:00:00 PDT 2014
That requires me having the names in scope, etc. I want to be
able to use the function object, just like I could do if it
weren't a method.
-tomer
On Thursday, 19 June 2014 at 09:22:09 UTC, Tobias Pankrath wrote:
> On Thursday, 19 June 2014 at 09:16:07 UTC, Tomer Filiba wrote:
>
>>
>> I tried `F(inst, args)` or `inst.F(args)` but they don't
>> work... what I need is the inverse of UFCS (e.g.,
>> `func(inst,1,2,3) ==> inst.func(1,2,3)`)
>>
>> Is there any way to overcome this?
>>
>> Thanks,
>> -tomer
>
> Did you try: mixin("inst.f(args)");?
>
> You would need to replace f with the correct function name, i
> guess.
More information about the Digitalmars-d
mailing list