Re: co/contra variance of roles/factories in theory.pod

2005-11-03 Thread Luke Palmer
On 11/3/05, Luke Palmer <[EMAIL PROTECTED]> wrote: > If Foo2 were a role (that is, if it obeys the role relation above), > then the only thing bar2() could do would be to take some side-effect > action and then return the same object it was passed. Here's a proof: > > Given ^T $x where Foo{^T}

Re: co/contra variance of roles/factories in theory.pod

2005-11-03 Thread Luke Palmer
On 11/3/05, TSa <[EMAIL PROTECTED]> wrote: > So if A <: B, I would expect Role{B} <: Role{A} and Factory{A} <: Factory{B} > on the following rational. Well, it's possible that I'm abusing the terms, since I first heard the terms from you and inferred what they meant. However, there is a problem i

co/contra variance of roles/factories in theory.pod

2005-11-03 Thread TSa
HaloO, I don't understand why theory.pod states that roles are covariant, unary theories and factories are contravariant. I would expect the opposite from the requirement that all functions in roles only take the topic type while function in factories only return the topic type. So if A <: B, I

Re: Role Method Conflicts and Disambiguation

2005-11-03 Thread TSa
HaloO, Rob Kinyon wrote: On Nov 2, 2005, at 9:02 PM, Jonathan Lang wrote: Let's say you have this: role A {method foo() { code1; } } role B {method foo() { code2; } } I think, A and B might just be aliases to the *identical* structural type because the only constraint that both roles impo

Re: Why submethods

2005-11-03 Thread TSa
HaloO, Luke Palmer wrote: On 10/29/05, Damian Conway <[EMAIL PROTECTED]> wrote: So we need a mechanism that is externally (i.e. from a class interface point-of-view) a subroutine, but internally has the features of a method (i.e. has an invocant). Since it's externally sub-like but internally

Re: Role Method Conflicts and Disambiguation

2005-11-03 Thread Rob Kinyon
> On Nov 2, 2005, at 9:02 PM, Jonathan Lang wrote: > > Let's say you have this: > > > > role A {method foo() { code1; } } > > role B {method foo() { code2; } } > > role C does A does B { > > method foo() { A::foo(); } > > method bar() { B::foo(); } > > } > > > > Should the following

Re: Role Method Conflicts and Disambiguation

2005-11-03 Thread Stevan Little
On Nov 2, 2005, at 9:02 PM, Jonathan Lang wrote: Let's say you have this: role A {method foo() { code1; } } role B {method foo() { code2; } } role C does A does B { method foo() { A::foo(); } method bar() { B::foo(); } } Should the following be valid? role D does C { method

Re: syntax-variants, RPN (was: Re: $_ defaulting for mutating ops)

2005-11-03 Thread Rob Kinyon
On 11/3/05, Michele Dondi <[EMAIL PROTECTED]> wrote: > On Wed, 2 Nov 2005, Ruud H.G. van Tol wrote: > > >> http://www.nntp.perl.org/group/perl.perl6.language/17556 > > > > I understand that Perl6 allows blocks with changed/enhanced syntax, so > > it is or will become possible (to add it) as if it w

Re: $_ defaulting for mutating ops

2005-11-03 Thread Michele Dondi
On Thu, 3 Nov 2005, Sam Vilain wrote: That being said, there are probably other more pressing reasons that ops should not accept $_ as default; I would guess, for a start, it makes determining semantics very difficult. Does ++; mean &postfix:<++> or &prefix:<++> ? If we had it, I think we wo

Re: syntax-variants, RPN (was: Re: $_ defaulting for mutating ops)

2005-11-03 Thread Michele Dondi
On Wed, 2 Nov 2005, Ruud H.G. van Tol wrote: http://www.nntp.perl.org/group/perl.perl6.language/17556 I understand that Perl6 allows blocks with changed/enhanced syntax, so it is or will become possible (to add it) as if it was in the core language. Do I understand that right? Something as sim