Defining some stuff for each class in turn

Christopher Wright dhasenan at gmail.com
Thu Oct 1 17:57:19 PDT 2009


Andrei Alexandrescu wrote:
> I am becoming increasingly aware that we need to provide some means to 
> define certain members (data and functions) for each class as if they 
> were pasted there.

Most of the examples given would be well served by decent builtin 
reflection. Walter thinks reflection is too expensive to be active by 
default. Find a cheaper way to provide runtime reflection. It's not as 
sexy as using templates, but it's DRY and easier to use. Slower, but you 
don't pay the cost of reflection multiple times if you have multiple 
libraries requiring reflection.



More information about the Digitalmars-d mailing list