Re: Anonymous classes

2005-05-29 Thread Ingo Blechschmidt
Hi, Simon Cozens wrote: > [EMAIL PROTECTED] (Ingo Blechschmidt) writes: >> I think the only thing you're missing are two braces: >> $.request_class = class is Foo::Request {}; > > Thank you; then how do I put methods into $.request_class? $.request_class = class is Foo::Request { method

Re: Anonymous classes

2005-05-29 Thread Simon Cozens
[EMAIL PROTECTED] (Ingo Blechschmidt) writes: > I think the only thing you're missing are two braces: > $.request_class = class is Foo::Request {}; Thank you; then how do I put methods into $.request_class? -- "I will make no bargains with terrorist hardware." -- Peter da Silva

Re: Anonymous classes

2005-05-29 Thread Ingo Blechschmidt
Hi, Simon Cozens wrote: > I'm having a seriously good time porting Maypole to Perl 6. If you > still have reservations about how Perl 6 is going to be to program in, > I urge you to try programming in it. > Now, commercial over, I have some questions. :) > class Foo { > has Cla

Anonymous classes

2005-05-29 Thread Simon Cozens
anonymous classes, and then adding methods to them? I've realised that anonymous classes are an excellent solution to subclassing *related* classes - for instance, you have a Foo class which creates Foo::Request and Foo::Response objects, and when you subclass Foo, you may want to specialis

RFC: Anonymous classes

2001-10-24 Thread Aaron Sherman
Is it too late for RFCs? How does one get approved for submission these days? Or, do we just mail them off to [EMAIL PROTECTED]? =head1 TITLE Anonymous classes =head1 VERSION Maintainer: Aaron Sherman <[EMAIL PROTECTED]> Date: 24 October 2001 Version: 1 Mailing List: perl6-la

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-09 Thread David L. Nicol
Matt Youell wrote: > > >What if you want multiple constructors with redundant code, et cetera -- > >there is flexibility. > > You could get that same flexibility from a mandated new(). If you don't want > to support new, overload it so that it does nothing. Or maybe that could be > the default b

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-06 Thread Michael G Schwern
On Fri, Jul 06, 2001 at 12:41:42PM -0500, David L. Nicol wrote: > But would the game be worth the candle? IMHO not really. Of all the potential quirks Perl's OO has, this is one of the least quirky and least violated. -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~schwer

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-06 Thread Matt Youell
>What if you want multiple constructors with redundant code, et cetera -- >there is flexibility. You could get that same flexibility from a mandated new(). If you don't want to support new, overload it so that it does nothing. Or maybe that could be the default behavior. The major benefit being a

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-06 Thread David L. Nicol
Matt Youell wrote: > > Is there a standard? No. Does there need to be one? I don't see a need > > for it. > > What's wrong with something simple, like saying all classes have an implicit > new() method that is overloadable? Is this really *that* complicated? Maybe > I'm not getting the Big Pic

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-05 Thread Matt Youell
> What's the problem again? > > I mean, really, any OO shop has it's local culture, of what the base > classes > are and so forth. That pretty much sounds like the problem, in a nutshell. And shop-level is a pretty narrow point of view. What about something that I d/l from the net, where the cod

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-05 Thread David L. Nicol
Matt Youell wrote: > > > > MI thing, but now it's sounding like a constructor bubbling scheme, like > > > Ah, yes. I've had to deal with that problem several times in the past. The > terminology was new to me, however. > > Has there been a proposed solution? > > Thanks, > > - Matt What's th

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-05 Thread John Porter
Matt Youell wrote: > The terminology was new to me, however. I made it up. -- John Porter

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-04 Thread Matt Youell
> > MI thing, but now it's sounding like a constructor bubbling scheme, like in > > C++, etc. > > Right. Perl doesn't have it by default, and *can't* have it > except under certain rather strict constraints, e.g. when all > players are playing by the Class::Struct rules, or some other > more elab

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-04 Thread John Porter
Matt Youell wrote: > Forgive my woeful ignorance Could someone define "data aggregation by > inheritance"? From John's original mention I thought this was some oblique > MI thing, but now it's sounding like a constructor bubbling scheme, like in > C++, etc. Right. Perl doesn't have it by def

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-04 Thread Piers Cawley
[EMAIL PROTECTED] writes: > On Tue, Jul 03, 2001 at 10:26:39AM +0100, Piers Cawley wrote: > > Hmm... let me write it first would you? Shouldn't be *too* hard. > > Suggestions for a real name for it? > > Class::Anonymous? Class::Anon? > > PS base has to take an array ref. Don't forget MI! I

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread David L. Nicol
Matt Youell wrote: > > Forgive my woeful ignorance Could someone define "data aggregation by > inheritance"? From John's original mention I thought this was some oblique > MI thing, but now it's sounding like a constructor bubbling scheme, like in > C++, etc. I understood it to mean automati

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread Matt Youell
Forgive my woeful ignorance Could someone define "data aggregation by inheritance"? From John's original mention I thought this was some oblique MI thing, but now it's sounding like a constructor bubbling scheme, like in C++, etc. Thanks! matt youell

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread David L. Nicol
John Porter wrote: > > Michael G Schwern wrote: > > > Give me data aggregation by inheritance > > Oooh, now that would be useful. > > Of course it would. That's why nearly every OO language (beside Perl) > has it. package circular_list_node; ... # defines how the list_nodes do

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread schwern
On Tue, Jul 03, 2001 at 10:26:39AM +0100, Piers Cawley wrote: > Hmm... let me write it first would you? Shouldn't be *too* hard. > Suggestions for a real name for it? Class::Anonymous? Class::Anon? PS base has to take an array ref. Don't forget MI! -- Michael G Schwern <[EMAIL PROTECTED]

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread Piers Cawley
Michael G Schwern <[EMAIL PROTECTED]> writes: > On Tue, Jul 03, 2001 at 08:34:00AM +0100, Piers Cawley wrote: > > my $anon = My::Anon::ObjectFactory->new({base => 'Class', > > method1 => sub { ... }, > >

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread Piers Cawley
quite the same thing, but Java does have the concept of > > > > anonymous classes (it names them 'inner' classes): Is Perl6 going > > > > to have a similar concept? > > > > Okay, maybe I don't understand anonyous classes, but isn't this pretty &g

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-02 Thread Piers Cawley
Michael G Schwern <[EMAIL PROTECTED]> writes: > On Mon, Jul 02, 2001 at 04:18:31PM -0400, Michael G Schwern wrote: > > On Mon, Jul 02, 2001 at 12:59:51PM -0700, David Whipp wrote: > > > Its not quite the same thing, but Java does have the concept of > > > anonym

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-02 Thread John Porter
Michael G Schwern wrote: > > Give me data aggregation by inheritance > Oooh, now that would be useful. Of course it would. That's why nearly every OO language (beside Perl) has it. > > and then I'll grant that inner classes are easy to tack on. > You can always do this right now: >

Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-02 Thread Michael G Schwern
On Mon, Jul 02, 2001 at 05:04:23PM -0400, John Porter wrote: > Michael G Schwern wrote: > > Are they really necessary? You can get the same effect so many other > > ways in Perl already, > > That is a very unhelpful attitude. We've already got everything and the kitchen sink proposed for Perl

Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-02 Thread Michael G Schwern
On Mon, Jul 02, 2001 at 04:18:31PM -0400, Michael G Schwern wrote: > On Mon, Jul 02, 2001 at 12:59:51PM -0700, David Whipp wrote: > > Its not quite the same thing, but Java does have the concept of > > anonymous classes (it names them 'inner' classes): Is Perl6 going >