On 12/22/2012 01:37 PM, Steve D wrote:
> I will continue playing with your suggestions etc to see
> what's cleanest.

Both of those options have unnecessary costs. If everything is known at compile time, you can use the curiously recurring template pattern:

import std.stdio;

class A(SubT) {
    final void f() { writefln("hi %s", SubT.hi); }
}

class B : A!B {
    static float[3] hi = 2;
}

void main()
{
    B b = new B();
    b.f();
}

Ali

Reply via email to