opDispatch or equivalent at static context

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Thu Jan 21 00:18:34 PST 2010


Chris Nicholson-Sauls wrote:
> (Apologies ahead of time if I've overlooked something.)
> 
> How possible could it be to have opDispatch or an equivalent feature 
> (opStaticDispatch?) available for static forwarding?  Use-case: I'm 
> envisioning an ORM library, where one could do things like:
>     Player.findFirstByName( "Bob" )
> 
> With a static forwarding template parsing the "findFirstByName" to 
> rewrite the call:
>     Player.find( FindFlags.First, `name == "Bob"` )


Isn't that what opDispatch does now?

-Lars



More information about the Digitalmars-d mailing list