Lazy binding of modules through templates
Martin Nowak
dawg at dawgfoto.de
Wed Sep 21 04:42:24 PDT 2011
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
More information about the Digitalmars-d
mailing list