On Wed, Sep 1, 2010 at 01:24, Joel Christensen joel...@gmail.com wrote:
Thanks for the fix up Philippe.
Just a little note. Where it says 'DynMethod m', you can put 'auto m', but
I'm wondering is it some times clearer to have the class name even though
'auto' works.
It depends on what you
Thanks for the fix up Philippe.
Just a little note. Where it says 'DynMethod m', you can put 'auto m',
but I'm wondering is it some times clearer to have the class name even
though 'auto' works.
Sorry to resurrect an old (4 days) thread.
I modified the example a bit, getting rid of '...' in DynMethod and
modifying opDispatch as Stanislav suggested. It works, and it's fun to play
with:
module dynamicmethods;
import std.stdio;
import std.conv;
import std.variant;
alias Variant
I've typed this example program in, but it doesn't compile. I looked up
the The D programming language errata but it wasn't listed. I'm using
DMD v2.048.
/**
Date: Aug 20, 2010
This was copied from TDPL book pages 386 - 387
*/
module dynamicmethods;
import std.stdio;
import
20.08.2010 13:00, Joel Christensen wrote:
There seem to be quite a few errors in this one:
/**
Date: Aug 20, 2010
This was copied from TDPL book pages 386 - 387
*/
module dynamicmethods;
import std.stdio;
import std.variant;
alias Variant delegate(Dynamic self, Variant[] args...)
You mean Andrei?
P.S. anyone can edit the errata page. It has a history backup, so if someone
accidentally screws up something you can roll back to a previous version. If
you find something that needs to be added, go ahead and do it.
Btw., I haven't reached that page yet. :p
Stanislav Blinov
20.08.2010 15:49, Andrej Mitrovic wrote:
You mean Andrei?
Nope :p
P.S. anyone can edit the errata page. It has a history backup, so if someone
accidentally screws up something you can roll back to a previous version. If
you find something that needs to be added, go ahead and do it.
Yeah, I