www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Lazy binding of modules through templates

Have you ever done something like this?

struct AA(Key, Value)
{
     import impl;
     impl.AA!(Key, Value) _impl;
     alias _impl this;
}

auto arrayOp(string exp, Oprnds...)(Oprnds oprnds)
{
     import impl;
     return impl.arrayOp!(exp, Oprnds)(oprnds);
}

I think this could be useful in simplifying the compiler to runtime  
interface.
Especially it could make associative arrays compile-time evaluatable  
without having
to put all source code into object.d.

martin
Sep 21 2011