I just thought it's really cool how D makes this possible and very
easy to do. Check it out:

http://codepad.org/yA8ju9u0

I was thinking of using something like this in code samples for a
library (e.g. CairoD), where a Recorder object like this would capture
the states of some shape and then generate a series of images on how
that shape changes over several function calls. And this could easily
be injected into HTML documentation.

Thanks to opDispatch I would only have to rewrite a small portion of
my sample code, replacing "Shape" ctor calls with Recorder(Shape())
calls.

Reply via email to