"Ellery Newcomer" <[email protected]> wrote in message news:[email protected]... > > Then there's the fact that the compiler doesn't represent code as strings. > If the compiler exposed the AST, all this might be less of an issue. ASTs > aren't a primitive type, but D's library capabilities are strong enough > that you might be able to design an AST such that AST manipulation doesn't > suck as much as in other c-style languages. It wouldn't be much more > readable than string generation, though. >
I'd love to see D do that (like Nemerle does), although I think the best time to do it would be after DDMD becomes the official DMD. That would eliminate a lot of extra work since the compiler's AST-related types could be made to double as part of the user API.
