[nem-en] Multiple project solutions

Kamil Skalski kamil.skalski at gmail.com
Wed Jan 10 13:08:42 CET 2007


2007/1/10, vc <vc at rsdn.ru>:
> > 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.
>

It is user's choice to get into such situation.

-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list