prototyping c++ language extensions

Clang is probably the best environment available to try such a thing. Of
course, with Clang, you would create a direct compiler instead of a
source-to-source translator. (My own plans for compile-time reflection will
also be prototyped in Clang.)

wouldn't it possible to have a default/identity/trivial code generator that produces readable c++ code? The reason i think this is important is than in languages like java annotations change the code at compile time but doesn't necessarily makes that code available for important stuff like debugging for instance. A source-to-source translator would allow an user to check the result of its compile-time metaprograms as c++ code instead of some target that is hard to debug/understand, i've seen some comments on this mailing list that mention source-to-source translators but i'm not sure if they are for extending clang or rather their own projects

Note, though, that experiments probably won't be accepted back into
mainline unless they prove themselves.

makes sense

Clang is probably the best environment available to try such a thing. Of
course, with Clang, you would create a direct compiler instead of a
source-to-source translator. (My own plans for compile-time reflection will
also be prototyped in Clang.)

wouldn't it possible to have a default/identity/trivial code generator that produces readable c++ code?

Translating a complete AST into parseable, readable C++ code is actually quite complicated. Clang may eventually get there (I hope it does!), but there is a lot of work to make that happen.

The reason i think this is important is than in languages like java annotations change the code at compile time but doesn't necessarily makes that code available for important stuff like debugging for instance. A source-to-source translator would allow an user to check the result of its compile-time metaprograms as c++ code instead of some target that is hard to debug/understand,

Source-to-source translation is a double-edged sword. Yes, you can see the transformed code to figure out what it does, and that is helpful to understand or debug the transformation. That might be helpful to some people to understand/debug their extensions, although I personally have found it to be a hindrance.