On Tue, May 11, 2010 at 08:25:47AM -0700, Patrick R. Michaud via RT wrote: > 1. I don't like that it modifies the parameters of !UNIT_START.
I see three alternatives - clone UNIT_START (DRY), inline UNIT_START in the PAST (DRY), and unify !RESUME_HERE with !YOU_ARE_HERE (makes modules run in the REPL setting - buggy). Do you see a better one? > 2. I don't think we should suppress autoprinting of statements and > blocks. For example, the 'while' statement above _does_ return a value, > it should be printed. The autoprint heuristic is currently "all non-nested expression statements". It's the simplest workable one I could think of, but it definitely needs refinement - some non-expression statements have values worth printing, and there's no point in printing the value of 'my $x = 2' or 'say $x'. Again, ideas welcome. > 3. I'm really not a fan that being in REPL mode or having autoprinting > enabled changes the AST that is produced. I think it ought to be > independent somehow. (Again, I might be able to be argued out of this one.) Are you suggesting moving all of this logic into PAST::Compiler? I would rather see it at least start in Rakudo, where it's easier to change; also I'm not a fan of PAST::Compiler generating completely different output from the same input depending on a couple contextuals, whereas our parser already is highly context sensitive (e.g. $*SCOPE). Suggestions welcome.