dynamic classes and duck typing

Alvaro Castro-Castilla alvcastro at yahoo.es
Mon Nov 30 15:20:49 PST 2009


Walter Bright Wrote:

> Simen kjaeraas wrote:
> > I'm already in love with this feature.
> 
> So am I. It seems to be incredibly powerful.
> 
> Looks to me you can do things like:
> 
> 1. hook up to COM's IDispatch
> 
> 2. create 'classes' at runtime
> 
> 3. add methods to existing classes (monkey patching) that allow such 
> extensions
> 
> 4. provide an easy way for users to add plugins to an app
> 
> 5. the already mentioned "swizzler" functions that are generated at 
> runtime based on the name of the function


Yes, this feature is really really useful. I specially like how much it can help in modularizing and your 3rd and 4th points.

I added a dmd2 svn version ebuild to Gentoo Linux's D overlay, for those of you who want to try it before next release. 



More information about the Digitalmars-d mailing list