Newsgroups: perl.perl6.language
From: pdcaw...@bofh.org.uk (Piers Cawley)
Date: Wed, 07 Jan 2004 08:23:52 +0000
Local: Wed, Jan 7 2004 3:23 am
Subject: Re: Roles and Mix-ins?
"Joe Gottman" <jgott...@carolina.rr.com> writes: I'm really not happy with the idea that simply using a typed variable > ----- Original Message ----- > From: "Luke Palmer" <fibon...@babylonia.flatirons.org> > To: <perl6-langu...@perl.org> > Sent: Tuesday, January 06, 2004 4:51 AM > Subject: [perl] Re: Roles and Mix-ins? >> David Storrs writes: >> > On Sat, Dec 13, 2003 at 11:12:31AM -0800, Larry Wall wrote: >> > > : For one, one role's methods don't silently override another's. >> > How do you disambiguate? >> Let's see... >> role Dog { >> Perhaps something like that. In any case, you do it by putting the > How about something like > Then we could have code like > This works better when Dog::bark and Tree::bark are both needed but they should change the way a method call on that variable is dispatched. You seem to be saying that class Parent { override { "Parent" }} my $kid = Child.new; my Parent $dad := $kid; print $kid.override; # "Child" And down that road lies C++ and other insanity. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||