Facing problems with Class Properties

d coder dlang.coder at gmail.com
Fri Dec 10 17:27:20 PST 2010


> 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?
>

If I got it right now, It will be possible for me to unroll the
foreach loop and the if statements in a mixin and that would work
well.
Or may be changing the "if" statement to "static if" would do the
trick. I will give it a try.

Thank you Steve and tank you Jesse for showing me the light.

Regards
- Cherry


More information about the Digitalmars-d-learn mailing list