A lightweight module for class extensions in D

Christian Kamm kamm-incasoftware at removethis.de
Sun Dec 7 01:10:02 PST 2008


I had done something similar, albeit using D2 and traits, in
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=56018

It's good to see it's possible in D1! The main advantage of __traits seems
to be that you can avoid building a lookup table and thereby simplify the
user interface. On the other hand, your approach will probably work even
when the extension methods are defined in different modules, as long as the
one with the extensions mixin is imported?




More information about the Digitalmars-d mailing list