Over on use.perl, someone spotted what looks like a bug in the example
program which (if it *is* a bug) is fixed by using unary '*', but
that's not what I'm writing about here.

In the discussion of the yadda yadda yadda operator, Damian says that 

   ... in this example, Err::BadData is *never* completely defined. So
   we'd get a fatal compile-time error ...

Surely it would be better to make it a 'CHECK' time error (or whatever
CHECK's equivalent will be in perl 6. ie, it happens after compilation
has finished, but before runtime starts. That way, the likes of
B::Deparse can still do useful work. 

Also, some sort of pragmatic control would be nice, say

   use incomplete;

would allow incomplete definitions to compile successfully, only
throwing errors if they are encountered at execution time. That way
one could write.

   CATCH {
       when TricksyException { 
           ...
       }
       when IgnoreableException {
           redo; # Hmm... how do I say 'redo the block containing the
                 # block containing the block containing the redo'?
                 # Labels are one way I guess, but how about 'redo 2'
                 # meaning 'go up two blocks from here'
       }
   }

And in the presence of 'use incomplete' the running code would run
happily until it encountered  an undefined section of, when it would
throw an 'IncompleteDefinitionException' or whatever.

Then one could also use 

    method abstract_method {...}

in abstract, or semi abstract class definitions, then again

    method abstract_method is abstract;

might well be a better bet, but that depends on whether a method
definition without a block is going to be legal syntax in perl 6 (and
reading between the lines of E4, I don't think it will be).

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to