Tonight I've updated Rakudo to have Failure objects that more closely match the description in S04 (i.e., with unthrown exception objects). However, because this causes a number of spectest_regression failures, I've committed the code into a 'failthrow' branch until we can get the test regression failures sorted out.
I've only checked a few tests, but there seem to be a number of places where uninitialized or undef values are used. For example, there are a number of places that check for undef using: is($var, undef, '$var is undef'); If I understand S04 correctly, C<undef> should return a Failure object with an unthrown and unhandled exception, and attempting to use the value of the Failure object immediately throws the exception. So, the above call to C<is> needs to be changed, or we need to make C<is> smart enough to properly handle and compare Failure objects in the manner given above. Anyway, this is just a note to invite others to start looking at this branch and help clean up or re-evaluate the test suite in light of failure handling. This branch also introduces a private '!FAIL' function that builtin methods can use to return better Failure objects without having to directly call "new 'Failure'". The Perl 6 builtin C<fail> function will be coming soon to this branch as well. Thanks! Pm