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