Re: RFC 218 (v1) C<my Dog $spot> is just an assertion
[email protected] (Piers Cawley) 14 Sep 2000 14:19:38 +0100
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Message-ID | <[email protected]> |
Michael G Schwern <[email protected]> writes: > On Wed, Sep 13, 2000 at 08:43:43PM -0000, Perl6 RFC Librarian wrote: > > The behaviour of the <my Dog $spot> syntax should simply be an > > assertion of the invariant: > > > > (!defined($spot) || (ref($spot) && $spot->isa('Dog))) > > What about the current behavior of typed pseudohashes? > > package Dog; > use fields qw(this night up); > > my Dog $ph = []; > $ph->{this} = "that"; That works? I thought you had to do: my Dog $self = fields::new('Dog'); (In which case, as far as I can see, the proposal makes no difference.) -- Piers