Day 133: Sixth day at Leo's: Call-by-need and call-by-name!

autrijus on 2005-06-16T21:48:32

Pugs's (new, shiny, GADT-powered) AST is confusingly declared in source code as the PAST type; but it is actually the Perl6 semantics, not Parrot semantics -- the PIR abstract syntax is of the PIR type. Neither of them are related to the other past which doesn't do anything useful currently.

Anyway, this PAST thing now has call-by-need (PThunk) and call-by-name (PBlock) semantics. That should handle both lvalue and rvalue thunking, for example:

    my ($x, $y); (0 ?? $x :: (0 ?? $x :: $y)) = 3; say $y;

Sorry that I didn't get cycles to fix Darren (and other people)'s reported bugs about Pugs's List/OO breakage. Hopefully my currently work on a sane compiler and also sane-enough PIR level primitives will clear up Perl 6's operational semantics enough, so we can run into less of runtime-only container-type-and-context-mismatch bugs.

That's it for today I think... Didn't have enough time to get aggregates working, so PIR doesn't exactly run Test.pm yet, but it's dangerously close.

Oh, and I really like the new L33T interpreter.