Fully dynamic d by opDotExp overloading

Nick Sabalausky a at a.a
Fri Apr 17 11:53:38 PDT 2009


"davidl" <davidl at nospam.org> wrote in message 
news:op.usjfexkpj5j59l at my-tomato...
>ÔÚ Fri, 17 Apr 2009 23:34:37 +0800£¬Steven Schveighoffer 
><schveiguy at yahoo.com> дµÀ:
>
> Actually in a lot cases, you don't have the time to write the static 
> wrapper.
> Also for a COM object, you don't want to call it in such ways:
>
> comobj.callfunc("ComObjFunc", 3,4,5);
>
> You probably want to call it only by comobj.ComObjFunc(3,4,5);
>
> Yes static wrapper can solve these all. Problem is not in all cases you 
> want to make a static binding for it.
>

Solution: Create a dispatch function like callfunc above, then use a mixin 
to generate static callfunc wrappers for any functions that you already know 
you want.

That way, you can have your trivial-to-create static bindings and sidestep 
them too. ;)





More information about the Digitalmars-d mailing list