On Wed, 2004-04-21 at 12:17, chromatic wrote:
* Add a disambiguatey method to PoliceDog that dispatches
appropriately. (Insert handwavey well you *could* do it this way or
you *might* do it that way.)
I agree, but given that the average user should probably not have to
interact with the
Aaron Sherman wrote:
seen the does b. You could assert the other way around:
class c { does a for bar baz; does b for foo biz; }
which is kind of nifty looking, but some may blanch at the dual meaning
for for
Funny how similar that is to
class c { does a handles bar baz; does b handles
On Fri, 2004-04-23 at 11:44, Brent 'Dax' Royal-Gordon wrote:
Aaron Sherman wrote:
class c { does a for bar baz; does b for foo biz; }
Funny how similar that is to
class c { does a handles bar baz; does b handles foo biz; }
In Relationship to Roles A12 makes the point that
-Original Message-
From: Aaron Sherman [mailto:[EMAIL PROTECTED]
On Fri, 2004-04-23 at 11:44, Brent 'Dax' Royal-Gordon wrote:
Aaron Sherman wrote:
class c { does a for bar baz; does b for foo biz; }
Funny how similar that is to
class c { does a handles bar baz;
On Fri, Apr 23, 2004 at 01:05:21PM -0400, Austin Hastings wrote:
: That seems like a good disambiguation marker, too:
:
: class Trog does Tree does Dog {...}
:
: # error: conflicting 'bark' methods
:
: class Trog
: is PersistentObject
: handles «meta dispatch SERIALIZE»
On Fri, 2004-04-23 at 14:17, Larry Wall wrote:
: does Tree
: handles «bark»
: does Dog
That works in the case of an explicitly named method, since that
effectively makes .bark a method in the current class. It would not
work for a wildcard delegation though, unless Dog
-Original Message-
From: Larry Wall [mailto:[EMAIL PROTECTED]
On Fri, Apr 23, 2004 at 01:05:21PM -0400, Austin Hastings wrote:
: That seems like a good disambiguation marker, too:
:
: class Trog does Tree does Dog {...}
:
: # error: conflicting 'bark' methods
:
: class
Austin Hastings wrote:
Jonathan Lang wrote:
role A {has Cat $.x;}
role B {has Dog $.x;}
class Foo {does Cat; does Dog;}
my Foo $bar;
$bar.x; # Is this a Cat or a Dog?
A12
If, however, two roles try to introduce a method of the same name (for
some definition of name), then the
At 2:37 PM -0700 4/23/04, Jonathan Lang wrote:
Austin Hastings wrote:
Jonathan Lang wrote:
role A {has Cat $.x;}
role B {has Dog $.x;}
class Foo {does Cat; does Dog;}
my Foo $bar;
$bar.x; # Is this a Cat or a Dog?
A12
If, however, two roles try to introduce a method of the same name
On Fri, Apr 23, 2004 at 02:37:58PM -0700, Jonathan Lang wrote:
: Note that the problem extends past accessors: a role's methods can access
: its attributes directly. So:
:
: role A {has Cat $.x; method m1 {return $.x;};}
: role B {has Dog $.x; method m2 {return $.x;};}
: class Foo {does
Larry Wall wrote:
On Fri, Apr 23, 2004 at 02:37:58PM -0700, Jonathan Lang wrote:
: Note that the problem extends past accessors: a role's methods can
: access its attributes directly. So:
:
: role A {has Cat $.x; method m1 {return $.x;};}
: role B {has Dog $.x; method m2 {return
On Fri, Apr 23, 2004 at 03:34:32PM -0700, Jonathan Lang wrote:
: Larry Wall wrote:
: On Fri, Apr 23, 2004 at 02:37:58PM -0700, Jonathan Lang wrote:
: : Note that the problem extends past accessors: a role's methods can
: : access its attributes directly. So:
: :
: : role A {has Cat $.x;
role A {has Cat $.x;}
role B {has Dog $.x;}
class Foo {does Cat; does Dog;}
my Foo $bar;
$bar.x; # Is this a Cat or a Dog?
=
Jonathan Dataweaver Lang
__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
-Original Message-
From: Jonathan Lang [mailto:[EMAIL PROTECTED]
role A {has Cat $.x;}
role B {has Dog $.x;}
class Foo {does Cat; does Dog;}
my Foo $bar;
$bar.x; # Is this a Cat or a Dog?
A12
If, however, two roles try to introduce a method of the same name (for some
definition
Originally sent to Austin alone by accident
Austin Hastings wrote:
-Original Message-
From: Jonathan Lang [mailto:[EMAIL PROTECTED]
role A {has Cat $.x;}
role B {has Dog $.x;}
class Foo {does Cat; does Dog;}
my Foo $bar;
$bar.x; # Is this a Cat or a Dog?
A12
If, however, two roles
On Wed, 2004-04-21 at 04:19, Buddha Buck wrote:
From one C6PAN module:
role Dog {
has $.collar;
...
}
From a third C6PAN module:
class PoliceDog does Dog does LawEnforcementOfficer { ... }
role LawEnforcementOfficer {
method arrest { ... }
has $.collar;# for
16 matches
Mail list logo