Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-06 Thread Andy Wardley
Sam Vilain wrote: No. All I'm saying is that this sort of construct: *{$_} = \{Class::$_} foreach (qw(method method2 method3)); Like mixins? Perhaps something like this: class My::Class; mixin My::Random::Number::Generator qw( rand ); mixin My::Serialisation::Marshall qw( freeze

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-06 Thread Simon Cozens
[EMAIL PROTECTED] (Andy Wardley) writes: Like mixins? Perhaps something like this: class My::Class; mixin My::Random::Number::Generator qw( rand ); mixin My::Serialisation::Marshall qw( freeze thaw ); Yey! With this, the Perl6-o-meter now stands at: PERL 5

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-06 Thread Larry Wall
On Thu, Mar 06, 2003 at 10:16:40AM +, Simon Cozens wrote: : Like mixins? Perhaps something like this: : :class My::Class; :mixin My::Random::Number::Generator qw( rand ); :mixin My::Serialisation::Marshall qw( freeze thaw ); : : Yey! With this, the Perl6-o-meter now stands at:

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Paul
--- Dan Sugalski [EMAIL PROTECTED] wrote: At 5:02 AM +1300 3/6/03, Sam Vilain wrote: *{$_} = \{Class::$_} foreach (qw(method method2 method3)); Gives you everything that inheriting a class does, apart from the -isa() relationship. And potential unwanted namespace pollution. It's

Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Sam Vilain
On Thu, 06 Mar 2003 04:19, Paul wrote: Are you speaking in terms of limitation, or requirement? It would be nice to have a syntax solution. I've seen p5 interfaces with stubs that die so that you have to override them in a subclass. It works, but seems a little kludgy. And I'm coming in late

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Paul
And I'm coming in late on this. Are you saying you want Exporter/%EXPORT_TAGS functionality built into the language and into all objects? Wouldn't that jack up the overhead? No. All I'm saying is that this sort of construct: *{$_} = \{Class::$_} foreach (qw(method method2

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Dan Sugalski
At 5:02 AM +1300 3/6/03, Sam Vilain wrote: No. All I'm saying is that this sort of construct: *{$_} = \{Class::$_} foreach (qw(method method2 method3)); Gives you everything that inheriting a class does, apart from the -isa() relationship. And potential unwanted namespace pollution. It's

RE: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Brent Dax
Sam Vilain: # We musn't dictate style. # # No, but we should emanate good style. And I consider opening # two class' # namespaces into the same stash to be very bad style. We *must* support MI, delegation and interfaces in Parrot. Interfaces can probably be implemented in terms of MI and/or

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Sam Vilain
On Thu, 06 Mar 2003 15:31, Brent Dax wrote: Sam Vilain: # We musn't dictate style. # # No, but we should emanate good style. And I consider opening # two class' # namespaces into the same stash to be very bad style. We *must* support MI, delegation and interfaces in Parrot. Interfaces

RE: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Brent Dax
Sam Vilain: # Alternatively, the approach taken with MI namespace clashes # in Perl 5 # is to let the programmer arrange the inheritance tree as he # sees fit, # # You are right - but this is a different condition. There is # no error in # this case because there is no ambiguity as to

Re: Multiple Inheritance eq Interfaces [was: Re: Object spec]

2003-03-05 Thread Sam Vilain
On Thu, 06 Mar 2003 16:22, Brent Dax wrote: Who said it would be silent? I mentioned emitting a warning below. The module writer will fix the warning, and module users can disable the warning easily until the new version is out. # It sounds like you already have a plan - I didn't realise #