Visitor pattern revisited in D

Michal Minich michal.minich at gmail.com
Mon Aug 27 08:40:00 PDT 2012


On Monday, 27 August 2012 at 15:00:11 UTC, deadalnix wrote:

the "fastCast" could probably be faster this way (I didn't 
checked / compiled)

private U fastCast (U) (object t) {
     return cast(U)(cast(void*)t);
}

one less de/reference.

btw, in your implementation should be (is(T == class) || is(T == 
interface))


More information about the Digitalmars-d-announce mailing list