On Wed, Nov 12, 2008 at 04:28:32AM +0900, Charles Oliver Nutter wrote:
> The problem with presenting parse trees are manifold:
>
> * The parse tree needs to be standardized or frozen

I disagree.  The parse tree can be presented to the user as an
implementation- and version-specific interface.  There need not be any
guarantee that the tree or the interface to the tree be stable across
versions.

> * The parse tree needs to be retrievable at runtime (meaning you have to  
> keep an AST or something similar even when you're not using it...huge  
> memory waste)

This is a problem.  1.9 used to keep the AST around but doesn't anymore,
presumably for this reason.

> * Parse trees reflect internal details of implementation (like 1.8/1.9  
> parsing Iter as wrapping calls, and the reverse in JRuby).
>
> I'd strongly prefer a few targeted reflective APIs, like get_args, be  
> added instead.

I agree.  I don't want to have to walk a parse tree.

(but it's nice to be able to)

Paul