dynamic classes and duck typing

Walter Bright newshound1 at digitalmars.com
Mon Nov 30 14:23:28 PST 2009


Simen kjaeraas wrote:
> Oh, and another thing: Will we get property syntax for this?
> 
> I'd like to use this for shaders, allowing one to refer to
> the shader's own variables directly from D, but currently I am
> limited to function call syntax (unless I'm missing something?)

You can do it, but be careful - you cannot add data members to a class 
by using templates. You'll have to fake them, by using enums, or a 
pointer to the actual data, etc.



More information about the Digitalmars-d mailing list