kennytm wrote:
struct Foo1 {
struct Unsafe {
static:
void bar() { ... }
}
}
Foo1 f;
f.Unsafe.bar();
That fails when you add variables though:
struct Foo {
struct Unsafe {
string name;
static void bar() {
writeln(name); // error: needs 'this'
}
}
}
Like I said, it's completely possible with templates today, you
just have to alias them for nice syntax. Parameterless templates
would just be sugar, but that sugar would be nice when you want
to use classifications like this in real code.
