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
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
> >
> 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
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
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
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";
> >
> >
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
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
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
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
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
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
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
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
> "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
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
> 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.
>
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
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
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
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
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
22 matches
Mail list logo