Re: RFC 218 (v1) C 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 C > > [\%{"$class\::FIELDS"}], $class>, but the current pseudohash > > > implementation do

Re: RFC 218 (v1) C 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 C > [\%{"$class\::FIELDS"}], $class>, but the current pseudohash > > implementation doesn't care if something is an object or not. It just > >

Re: RFC 218 (v1) C is just an assertion

2000-09-18 Thread Damian Conway
> I'm not going to have time to produce an RFC on this in time for the > cutoff point. (Which seems painfully soon tbh). I will be struggling to find the time too. I'll do my best. Damian

Re: RFC 218 (v1) C is just an assertion

2000-09-18 Thread Piers Cawley
Buddha Buck <[EMAIL PROTECTED]> writes: > 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

Re: RFC 218 (v1) C 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 C but with >> 'Interface' cons

Re: RFC 218 (v1) C 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"; > > > >

Re: RFC 218 (v1) C 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 C but with >> 'Interface' cons

Re: RFC 218 (v1) C 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 C but with > 'Interface' consisting of nothing but: > > > package Interfac

Re: RFC 218 (v1) C 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 = f

Re: RFC 218 (v1) C 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 cour

Re: RFC 218 (v1) C 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 syntax should simply be an > > assertion of the invariant: > > > >(!defined($spot) || (ref($spot) && $spot->isa('Dog))) > > What about the current

Re: RFC 218 (v1) C is just an assertion

2000-09-14 Thread Piers Cawley
Nathan Wiger <[EMAIL PROTECTED]> writes: > Nathan Torkington wrote: > > > > Yes! I mentioned the hypothetical > > use strict 'types'; > > which would require all variables assigned to/from an object, and > > all variables upon which method calls are made, to be typed like > > this. Then the

Re: RFC 218 (v1) C is just an assertion

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

Re: RFC 218 (v1) C 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 > > C is just an assertion > > =head1 VERSION > > Maintainer: Piers Cawley <[EMAIL PROTECTED]> > Date: 13th September 2000 > Mailing List: [EMA

Re: RFC 218 (v1) C is just an assertion

2000-09-13 Thread Chaim Frenkel
> "NT" == Nathan Torkington <[EMAIL PROTECTED]> writes: NT> Every compile-time check comes at the cost of a run-time freedom, NT> though. All bets would be off if you modified @ISA, reblessed, or NT> passed objects through non-strict-types-compliant code. Polymorphic NT> types also becomes

Re: RFC 218 (v1) C 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 star

Re: RFC 218 (v1) C 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) C is just an assertion

2000-09-13 Thread Nathan Torkington
Nathan Wiger writes: > > Polymorphic > > types also becomes a problem: how to say that it's okay for a variable > > to hold a Dog *or* a Cat, because we know that both of them have a > > "pet()" method? > > Seems in order to satisfy this you'd have to have a common ancestor, > Pet, which Dog and

Re: RFC 218 (v1) C is just an assertion

2000-09-13 Thread Michael G Schwern
On Wed, Sep 13, 2000 at 08:43:43PM -, Perl6 RFC Librarian wrote: > The behaviour of the 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 fie

Re: RFC 218 (v1) C is just an assertion

2000-09-13 Thread Nathan Wiger
Nathan Torkington wrote: > > Yes! I mentioned the hypothetical > use strict 'types'; > which would require all variables assigned to/from an object, and > all variables upon which method calls are made, to be typed like > this. Then the compiler can: > (a) optimize > (b) check at compile-ti

Re: RFC 218 (v1) C is just an assertion

2000-09-13 Thread Nathan Torkington
Perl6 RFC Librarian writes: > I therefore propose that C comes to mean that C<$spot> > is restricted to being either undefined or a reference to a C > object (or any subclasses of Dog). Simply having this implicit > assertion can be useful to the programmer, but I would argue that its > main advan

RFC 218 (v1) C is just an assertion

2000-09-13 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE C is just an assertion =head1 VERSION Maintainer: Piers Cawley <[EMAIL PROTECTED]> Date: 13th September 2000 Mailing List: [EMAIL PROTECTED] Number: 218 Version: 1 Status: Developing =head1 ABS