Re: Draft RFC: my Dog $spot is just an assertion

[email protected] (Hildo Biersma) Wed, 13 Sep 2000 08:31:57 +0100
Newsgroups perl.perl6.language.objects
Organization Morgan Stanley Dean Witter & Co.
Message-ID <[email protected]>
Piers Cawley wrote:

> =head1 ABSTRACT
> 
> The behaviour of the <my Dog $spot> syntax should simply be an
> assertion of the invariant:
> 
>    (!defined($spot) || (ref($spot) $spot->isa('Dog)))

Apart from the buglet that Damian pointed out, agree.

Instead of an implementation based on tie, I'd rather define logical
sequence points where the core would check this assertion - e.g., just
after any modification (assignment, bless, change in @ISA-tree, ...).

Hildo