[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

perltoot barbie! (was Re: [FWP] do... while? SPOILER)



Quoting Randal L. Schwartz (merlyn@stonehenge.com):
> There are reasons why I don't send people to read perltoot.  One of
> them is that it was written by someone who seems to hate Perl, and
> does everything as a workaround in spite of Perl.

YES! This is the quality of flamage the Internet needs more of. I'd pay
money to see these two on Jerry Springer.

> I'm thinking of writing "Randal's Object Oriented Tutorial"
> (perlroot.pod) based on a summary of what I'm now teaching in my OO
> Perl class (and some of what I learned reading Damian's forthcoming
> book), but sadly it will probably never make the standard Perl
> distribution.

I had to learn Java before I could understand Perl OO. Which made

> sub new {
>   my $this = shift; my $class = ref $this || $this; bless { @_ }, $class;
> }

all the more mindblowing. But now I've been using Perl OO for a few years,
it seems strange to go back to languages where the constructor is a special
case. I wonder if it's possible to have a statically-compiled language where
constructors are ordinary static methods? Does such a beast exist?

The disadvantage of Perl's flexibility here is when people abuse it, with
strangely-named constructors (Tgetent in Term::Cap) or things like new2 (in
LWPng). I guess natural selection prefers modules that don't waste a
programmers time, though.

> If I get some encouragement, I'll write perlroot.pod whether or not
> it ends up in the dist.

I'm all in favour of it, though I suspect it's too late for me.

-- 
Adam Rice -- wysiwyg@glympton.airtime.co.uk -- Blackburn, Lancashire, England

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe