Piers wrote:
> 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.
I'll admit I'm not sure whether it is a bug or not. I've asked Larry for
clarification and will post an update as soon as he responds.
> 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.
Well, I consider C<CHECK> to be part of of compile-time,
so I don't think we're disagreeing. :-)
> Also, some sort of pragmatic control would be nice, say
>
> use incomplete;
or perhaps:
no strict 'definitions'.
> 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'
> }
> }
As described in E4, you make the block containing the block containing the
block containing the C<redo> a C<loop> block (or a labelled block).
> 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).
Larry indicated to me that blockless declarations of methods and subs
would be illegal. So you'd probably have to write:
method abstract_method is abstract {...}
And the C<is abstract> would absolve your method from the compile-time "method
'abstract_method' was never defined" error.
Damian