Day 15: "return" of the monads

autrijus on 2005-02-15T15:28:21

Much of today has been spending on teaching Bestian to use Eclipse's haskell mode (as he can't stand vim), svk, and various other wonderful project-related tools.

However we did finish one important thing, namely the lexically-bound "return" inside subroutines now does a shiftT upwards, so you can say:

sub foo {
    return 1;
    return 2;
}
And it returns 1, not 2. A small step, but that means leave() and other flow control operators are similarily feasible now.

I've also started porting Test::More (or at least a close approximation of it) to pugs. The eventual goal is to populate t/*.t with test files run by pugs.

Various small scripting-related things are added: @*ARGS and $*PROGNAME (I failed to find the mention of $0's new name in Apoc/Syno, so I' just picked one randomly), some strigification tweaks, and (violating the FP6 spec a bit) a mostly functional "print" primitive. Stay tuned!