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
[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
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, 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
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
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
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
>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
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
> 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
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
Matt Youell wrote:
> The terminology was new to me, however.
I made it up.
--
John Porter
> > 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
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
[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
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
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
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
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]
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 { ... },
> >
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
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
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:
>
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
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
>
25 matches
Mail list logo