On 30.09.2010 22:04, Jonathan M Davis wrote:

You could initialized it in a static constructor. e.g.

static this()
{
        X = Vector(1, 0, 0);
}

I'll use that, thanks.

As a side note, I find the syntax quite unfortunate. It reads to me as if the static constructor will only be called if the default constructor is used (I know, this does not make sense as the static constructor will be called before main, and before any non-static constructor). Still, I wonder why not simply the Java syntax

static {
    // ...
}

was adopted.

--
Sebastian Schuberth

Reply via email to