Facing problems with Class Properties

d coder dlang.coder at gmail.com
Fri Dec 10 17:08:58 PST 2010


> What you are saying makes sense to me. The problem is that the
> following code works perfectly. I have just commented out some part
> and replaced it with some debug statements.

Ah.. Now I think I understand.

This new code I have written will all be run at compile time. So in
this case, the foreach statement inside the constructor would be
reduced to a bunch of writeln statements at compile time and those
writeln would be executed at the run time. This will not happen with
the actual code since there are other typeof and is statements in
there that can not be run at runtime.

Did I get it right?


More information about the Digitalmars-d-learn mailing list