[nem-en] Multiple project solutions
vc
vc at rsdn.ru
Wed Jan 10 12:46:46 CET 2007
> For exampe I use logging
> macros, which generate the log4j logger as field in current class on
> need - if my
>
> log (DEBUG, "...")
What for?
> Also, we have seen interesing examples of macros generating whole classes:
>
> metaclass myMeta { x : int; y : string };
> assert (myMeta (1, "").X == 1);
> assert (myMeta (2, "a").Y == "a");
It's can be (and must be) placed in meta-attribute:
[assembly: Metaclass(myMeta { x : int; y : string })]
Understand, we *cannot guarantee* that method bodies compiled in
design-time.
If we admit generation of top level constructions in expression macros it
will result in undefined behavior (in design-time). And behavior in
design-time and compile-time will be differing.
More information about the devel-en
mailing list