[Mono-list] Implementing attribute-based code generation

Michal Moskal Michal Moskal <michal.moskal@gmail.com>
Fri, 14 Jan 2005 12:30:49 +0100


On Thu, 13 Jan 2005 16:54:10 +0100, Raibaud, Benjamin
<Benjamin.Raibaud@pmintl.com> wrote:
> It seems to me you are re-creating C++ macros... (Like ASSERT...). 

I guess metaprogramming techniques described in this thread go well
beyond simple lexer-level preprocessing. For example to instert a
postcondition you need to check if the function returns anything and
transform the code.

> Maybe you
> just need a C# pre-compiler embedded in your IDE ?

The usual problems with pre-compilers is getting error reporting right
(which may or may not be possible with just #line stuff), and the duty
of writing a second C# compiler to understand the code that is going
to be transformed.

That's why having extensible compiler is A Good Thing.

-- 
: Michal Moskal :: http://nemerle.org/~malekith/ :: GCS !tv h e>+++ b++
: No, I will *not* fix your computer............ :: UL++++$ C++ E--- a?