"davidl" <dav...@nospam.org> wrote in message news:op.usjfexkpj5j...@my-tomato... >ÔÚ Fri, 17 Apr 2009 23:34:37 +0800£¬Steven Schveighoffer ><schvei...@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. ;)