[nem-en] Multiple project solutions

vc vc at rsdn.ru
Wed Jan 10 22:37:17 CET 2007


> We can invent a method to minimize such effect. Note that those macros
> by nature do something only if compiler compiles method with them, so
> it is natural that code using the generated class is also local to
> this method / class. And in order to avoid duplicated classes
> generation user need to check for compiler mode / existing generated
> stuff anyways. So my guess is that in practice it should not cause
> much problems and if it does user will be able to workaround them (by
> checking if code he wants to generate exists already).
...
> 
> With the Units example - I agree, I also see declaration based
> generation as better... But for "private" helper fields/methods or
> other stuff...

OK, private helpers have the right to a life.

But, you do don't consider a one problem. 
If Nemerle becomes mainstream language right away it will be used by lamers,
novice and inattentive coders. And (by Murphy's law) if anything can go
wrong, it will... and at the most inopportune time.

Besides we compile method body scores of times. It makes duplicate
types/members and cause error messages.

I see one way in this situation. We must allow add (from expression macro)
top level code only by way of special methods (API). In Integration this
methods do nothing. Also code added by this method must be mark with some
flag. It flag mast hide generated code from direct user asses.




More information about the devel-en mailing list