[Pdx-pm] Ugly code!

Ovid poec at yahoo.com
Sat May 31 19:46:22 CDT 2003

--- "Michael R. Wolf" <MichaelRunningWolf at att.net> wrote:
> >   sub connect {
> >       my $self = shift;
> >       return $self;
> >   }
> >
> > (It's effectively a no-op)
> Actually, it's an identity.
> I couldn't think of any reason it's useful except to stub out a
> function during prototyping.

Okay, that I can see.  Of course, leaving it in once it gets into production is a different

> MJD, on the other hand, *has* thought of how it can be useful in a
> production system. I happened to stumble across, and read, a talk of
> MJD's. I thought it was interesting.  See
>     http://perl.plover.com/yak/identity/ 

Two comments:

1.  The connect() subroutine wasn't actually being used (the programmer had another connect()
function in a different class -- most confusing).

2.  Dominus' slides reminds me of a comment that a chess grandmaster once made regarding Bobby
Fisher's playing style:  "I can see the brilliance of his positions.  I just can't figure out how
to get there." :)

Dominus does some fascinating stuff and I can see how he does it, but my mind sees things in a
procedural or OO fashion.  Functional programming is still a bit bizarre for me.


Ovid                       http://www.perlmonks.org/index.pl?node_id=17000
Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/
Silence Is Evil            http://users.easystreet.com/ovid/philosophy/indexdecency.htm

Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).

More information about the Pdx-pm-list mailing list