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 behavior.

Re: Anyone actually experienced with object inheritance?

2001-07-06 Thread Michael G Schwern
On Thu, Jul 05, 2001 at 11:04:29AM -0700, Hong Zhang wrote: I don't think object inheritence has any significant advantage. Since it is not widely used and understood, we should not use it in Perl, period. *cough* A little harsh. Its functionality can be achieved by many different ways.

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 Picture.

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 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/~schwern/

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: Anyone actually experienced with object inheritance?

2001-07-05 Thread Hong Zhang
I don't think object inheritence has any significant advantage. Since it is not widely used and understood, we should not use it in Perl, period. Its functionality can be achieved by many different ways. The anonymous class is one of them. Personally I prefer using mixin. The mixin is similar

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 the problem

Re: Anyone actually experienced with object inheritance?

2001-07-05 Thread David L. Nicol
Hong Zhang wrote: Say if you want Thread can be easily inserted into LinkedList, you can write public Thread extends Object implements Node { ... } or public Thread extends Object, Node { ... } and don't bother to implement classic linked list node. Hong You could use

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 code is

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

2001-07-04 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 automatic

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 haven't

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 default,

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 elaborate

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

2001-07-03 Thread Piers Cawley
Piers Cawley [EMAIL PROTECTED] writes: 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

Re: Anyone actually experienced with object inheritance?

2001-07-03 Thread Michael G Schwern
On Tue, Jul 03, 2001 at 12:10:19AM +0200, Bart Schuller wrote: The Apple Newton was programmed in NewtonScript, a prototype-based language. http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ seems like a nice overview. Ahh, its derived from Self. -- Michael G. Schwern [EMAIL

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 { ... }, method2 =

Re: Anyone actually experienced with object inheritance?

2001-07-03 Thread Joe McMahon
On Tue, 3 Jul 2001, Bart Schuller wrote: The Apple Newton was programmed in NewtonScript, a prototype-based language. http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ seems like a nice overview. NewtonScript was an excellent language; with prototype-based inheritance, you could get

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 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 their

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: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
[EMAIL PROTECTED] wrote: Rather than stumbling around in the dark here, is anyone actually experienced with object inheritance? Any Self programmers out there? Someone that's actually used this technique often and understands what works and what does? I haven't used Self, only Lisp and Perl

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread schwern
On Mon, Jul 02, 2001 at 08:32:04AM -0400, John Porter wrote: It actually is very applicable in programming Frame systems, which are a kind of souped-up semantic network thing, used a lot in knowledgebases. Could you show me an example of what that is, how traditional class-based OO tries to

RE: Anyone actually experienced with object inheritance?

2001-07-02 Thread David Whipp
Michael G Schwern wrote: Rather than stumbling around in the dark here, is anyone actually experienced with object inheritance? Any Self programmers out there? Someone that's actually used this technique often and understands what works and what does? Any books/articles to recommend? Its

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread Michael G Schwern
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 to have a similar concept? Are they really necessary? You can get the same effect so many other ways

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 to have a similar concept?

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread Damien Neil
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 to have a similar concept? Inner classes and anonymous classes are actually different in Java.

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread Jarkko Hietaniemi
On Mon, Jul 02, 2001 at 01:30:11PM -0700, Damien Neil 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 to have a similar concept? Inner

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
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 to have a similar concept? Well, Perl5 has neither of the features that would make inner classes meaningful -- data structure aggregation by

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
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. Give me data aggregation by inheritance, namespace scoping, and interfaces, and then I'll grant that inner classes are easy to tack on. --

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
Jarkko Hietaniemi wrote: I forget... has the possibility/utility of having nested namespaces been discussed? Not sure; probably... but we'd need not just *nested* namespaces, but namespace *scoping*. Perhaps this could be done by allowing to attach a name to q lexical scope; perhaps this

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 6.

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread Michael G Schwern
On Mon, Jul 02, 2001 at 05:09:58PM -0400, John Porter wrote: Perhaps this could be done by allowing to attach a name to q lexical scope; perhaps this could be conflated with normal labels. my package Foo { sub bar { ... } } perhaps? -- Michael G. Schwern

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
Michael G Schwern wrote: my package Foo { sub bar { ... } } Well... package is a magic perl5-inducing keyword in perl6, right? Maybe namespace is the way to go. -- John Porter

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: ...

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread schwern
On Mon, Jul 02, 2001 at 05:38:11PM -0400, John Porter wrote: Well... package is a magic perl5-inducing keyword in perl6, right? Maybe namespace is the way to go. I think the idea was class. Lexical namespaces can just mirror whatever happens to the rest of the package/class system. --

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread Bart Schuller
On Sun, Jul 01, 2001 at 04:35:16PM -0400, [EMAIL PROTECTED] wrote: Rather than stumbling around in the dark here, is anyone actually experienced with object inheritance? Any Self programmers out there? Someone that's actually used this technique often and understands what works and what

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 anonymous classes (it names them 'inner' classes):