Re: Fwd: Re: OO inheritance in a hacker style

2004-02-04 Thread Jonathan Lang
Joseph Ryan wrote: > Well, what if the two classes you want to inherit from weren't > designed with roles in mind? For instance, there might be two > CPAN modules that each have a dozen methods that you want to > inherit, but they each have 1 that overlap whose conflict you > want to easily resolv

Fwd: Re: OO inheritance in a hacker style

2004-02-04 Thread Joseph Ryan
Woops, sent it to the wrong list! - Joe Joseph Ryan wrote: Luke Palmer wrote: Austin Hastings writes: Hmm. The text and examples so far have been about methods and this seems to be about multi-methods. Correct me if I'm wrong ... You're wrong. Consider my example, where via single inh

RE: OO inheritance in a hacker style

2004-01-30 Thread Jonathan Lang
Austin Hastings wrote: > Jonathan Lang wrote: > > Actually, no; roles don't _need_ "suppress" or "rename" options to > > disambiguate a conflict: the priority chain of "class methods, then > > role methods, then inherited methods" provides all the tools that are > > _required_ to remove ambiguities

Re: OO inheritance in a hacker style

2004-01-30 Thread Luke Palmer
Austin Hastings writes: > > Hmm. The text and examples so far have been about methods and this > > seems to be about multi-methods. Correct me if I'm wrong ... > > You're wrong. Consider my example, where via single inheritance we reach a > "layered" list of methods, each of which replaces the pr

RE: OO inheritance in a hacker style

2004-01-30 Thread Austin Hastings
> -Original Message- > From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED] > On Thu, Jan 29, 2004 at 10:54:18PM -0500, Austin Hastings wrote: > > > -Original Message- > > > From: Jonathan Lang [mailto:[EMAIL PROTECTED] > > > > > > Actually, no; roles don't _need_ "suppress" or "re

Re: OO inheritance in a hacker style

2004-01-30 Thread Jonathan Scott Duff
On Thu, Jan 29, 2004 at 10:54:18PM -0500, Austin Hastings wrote: > > -Original Message- > > From: Jonathan Lang [mailto:[EMAIL PROTECTED] > > > > Actually, no; roles don't _need_ "suppress" or "rename" options to > > disambiguate a conflict: the priority chain of "class methods, then role >

RE: OO inheritance in a hacker style

2004-01-29 Thread Austin Hastings
> -Original Message- > From: Jonathan Lang [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 29, 2004 10:25 PM > To: [EMAIL PROTECTED]; Perl6 Language > Subject: RE: OO inheritance in a hacker style > > > Austin Hastings wrote: > > Jonathan Lang wrote: &g

RE: OO inheritance in a hacker style

2004-01-29 Thread Jonathan Lang
Austin Hastings wrote: > Jonathan Lang wrote: > > The danger isn't really in the ability to suppress a method from a > > given role or parent; the danger comes from the ability to suppress a > > method from _every_ role or parent. A safe alternative to this would > > be to define a class method

RE: OO inheritance in a hacker style

2004-01-29 Thread Austin Hastings
> -Original Message- > From: Jonathan Lang [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 29, 2004 1:29 AM > To: Joseph Ryan; Dmitry Dorofeev > Cc: Perl6 Language List > Subject: Re: OO inheritance in a hacker style > > > Joseph Ryan wrote: > > >

Re: OO inheritance in a hacker style

2004-01-28 Thread Jonathan Lang
Joseph Ryan wrote: > Of course, roles are another great way to prevent confusion with > multiple inheritance. A good question would be whether something > like "forget" is useful in addition, or whether everyone should > just use roles. :) For the record, roles are not a form of multiple inherit

Re: OO inheritance in a hacker style

2004-01-28 Thread Luke Palmer
Dmitry Dorofeev writes: > Hi all. > Sorry if this idea|question has been discussed or has name which i don't > know about. > > I am not very good at OO but I tried at least 2 times to develop with > it though :-) Last time it was Java. The problem is that when i going > to use some 'standard' cla

Re: OO inheritance in a hacker style

2004-01-28 Thread Joseph Ryan
Dmitry Dorofeev wrote: Hi all. Sorry if this idea|question has been discussed or has name which i don't know about. I'd like to write Class myclass : a { forget method area; forget method move; method put; } so methods getX, getY, size will be 'inherited'. Methods 'area' and 'move' will be n

Re: OO inheritance in a hacker style

2004-01-28 Thread Michael G Schwern
On Wed, Jan 28, 2004 at 03:18:24PM +0300, Dmitry Dorofeev wrote: > I am not very good at OO but I tried at least 2 times to develop with it > though :-) > Last time it was Java. The problem is that when i going to use some > 'standard' class > or 3d party class i'd rather to cut off all unnecessa