Piers,
On Oct 14, 2005, at 12:14 PM, Piers Cawley wrote:
Stevan Little <[EMAIL PROTECTED]> writes:
On Oct 12, 2005, at 5:22 AM, Piers Cawley wrote:
We definitely have two instances of A since, B.isa(::A). We also
have
a fragile implementation of count.
:)
Sorry, I purposefully made it a kludge as that is usually the way
the example
is shown in most tutorials about class methods.
So, let me see if I have this straight here. You're arguing that,
because
people are often foolish, we should make it harder to be clever?
No, more that people have been lead down the wrong paths all too
often based on limitations of language implementation. And that Perl
6 should be moving to correct this problem. Sure that might be un-
Perlish in the sense that we are not leaving every "way to do it"
open. But at some point I think you need to shake off the old
accumulated crud and start fresh, even if that new way might go
contrary to what some people have been conditioned to think.
I also do not believe that I am making it "harder", as much as I am
making it "different". Change is hard, but it *is* inevitable.
I think Perl 6's OO system has the potential to be to OO programming
what Perl 5, etc was to text processing. This, I believe, is in large
part due to the fact that Perl 5 had such a "slim" object system, and
Larry intended (based on what I have read in A12) to start fresh from
the ground up. That, coupled with Perl's tendency to "borrow" the
best from everywhere, and you have the potential for a really great
OO system.
And you're using a deliberately broken example as grist to your mill?
The example is the canonical example for class methods/attributes,
and yes it is broken. However, it's broken-ness only serves to
illustrate, what I think is, the misunderstanding of the usefulness
of class methods in general. One only needs to take a quick sampling
of some of the more popular CPAN modules which sport an "OO"
interface to see that all to often class methods are (ab)used to get
what amounts to "procedural modules with inheritence".
Doesn't sound all that Perlish to me.
Perl is many different things to different people, this is part of
it's beauty as a language. Perl also has the unique ability to be
able to re-invent itself on a regular basis (shell-scripts, CGI,
bioinformatics, what next??). I personally think that the definition
of what is "Perlish" and what is not "Perlish" is not only highly
subjective, but ever changing.
So I guess what I am saying here is "thank you", as I will take that
as a compliment ;)
Stevan