From: itsme213 Date: 2004-11-11T07:18:30+09:00 Subject: Re: Ruby code generation: string vs. AST based (2.0 or beyond) "Tobias Peters" wrote i > > This would require a published AST, some manipulations on it, and an eval > > that takes ASTs. > > It would be an exciting feature. But I sriously doubt that AST > manipulations will be less brain-hurting. > > Tobias It's not trivial, but it is a whole bunch closer to my mental model than string manipulation. It also gives Ruby a nice push in the direction of MDA-like approaches. Let's see: - I can build domain-specific languages in Ruby. - I'm asking to get a standard AST representation of programs in those languages. - If I write my language-definition language itself in Ruby (e.g. racc), I also have standard access to the language definition of the domain-specific language itself. So I can write generic tools (e.g. transforms, editors, ...) that leverage the language definitions. We could have a very promising combination of MDA and DSLs.