Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-19 Thread Piers Cawley
Michael G Schwern [EMAIL PROTECTED] writes: On Mon, Sep 18, 2000 at 09:48:27AM +0100, Piers Cawley wrote: Michael G Schwern [EMAIL PROTECTED] writes: Nope. fields::new() basically just does Cbless [\%{"$class\::FIELDS"}], $class, but the current pseudohash implementation doesn't

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-18 Thread Piers Cawley
Michael G Schwern [EMAIL PROTECTED] writes: On Thu, Sep 14, 2000 at 02:19:38PM +0100, Piers Cawley wrote: Michael G Schwern [EMAIL PROTECTED] writes: package Dog; use fields qw(this night up); my Dog $ph = []; $ph-{this} = "that"; That works? I thought you

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-18 Thread Piers Cawley
Damian Conway [EMAIL PROTECTED] writes: Piers wrote: I'm kind of tempted to look at adding another pragma to go with 'use base' along the lines of: use implements 'Interface'; Which is almost entirely like Cuse base 'Interface' but with 'Interface'

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-18 Thread Michael G Schwern
On Mon, Sep 18, 2000 at 09:48:27AM +0100, Piers Cawley wrote: Michael G Schwern [EMAIL PROTECTED] writes: Nope. fields::new() basically just does Cbless [\%{"$class\::FIELDS"}], $class, but the current pseudohash implementation doesn't care if something is an object or not. It just

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Piers Cawley
Perl6 RFC Librarian [EMAIL PROTECTED] writes: This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Cmy Dog $spot is just an assertion =head1 VERSION Maintainer: Piers Cawley [EMAIL PROTECTED] Date: 13th September 2000 Mailing List: [EMAIL

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Piers Cawley
Nathan Torkington [EMAIL PROTECTED] writes: Perl6 RFC Librarian writes: I therefore propose that Cmy Dog $spot comes to mean that C$spot is restricted to being either undefined or a reference to a CDog object (or any subclasses of Dog). Simply having this implicit assertion can be

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Piers Cawley
Michael G Schwern [EMAIL PROTECTED] writes: On Wed, Sep 13, 2000 at 08:43:43PM -, 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

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Nathan Torkington
Piers Cawley writes: TBH, I'm not sure I want to go too far down that road in this RFC. And tbh they seem more like internals issues to me. The runtime behaviour this change grants is good enough for me and I don't want to see the proposal bogged down in flamage about strict types. Of course,

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 02:19:38PM +0100, Piers Cawley wrote: Michael G Schwern [EMAIL PROTECTED] writes: 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 =

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Damian Conway
Piers wrote: I'm kind of tempted to look at adding another pragma to go with 'use base' along the lines of: use implements 'Interface'; Which is almost entirely like Cuse base 'Interface' but with 'Interface' consisting of nothing but:

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-14 Thread Buddha Buck
At 08:13 AM 9/15/00 +1100, Damian Conway wrote: Piers wrote: I'm kind of tempted to look at adding another pragma to go with 'use base' along the lines of: use implements 'Interface'; Which is almost entirely like Cuse base 'Interface' but with 'Interface'

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-13 Thread Damian Conway
I was hoping Damian would be able to suggest a Perlish way of handling typechecking and polymorphism. If you mean static typechecking, then it is the natural enemy of polymorphism. Either you give up interface polymorphism (a grievous loss) or you give up static type-checking.

Re: RFC 218 (v1) Cmy Dog $spot is just an assertion

2000-09-13 Thread Nathan Torkington
Damian Conway writes: Either you give up interface polymorphism (a grievous loss) or you give up static type-checking. Blech, you're right. Actually, it's inheritance polymorphism that proliferates pretend classes like Pet. I meant that. Sorry, you're so in tune with Perl that I'm