[Techtalk] Re: On Perl (Kai MacTane)

gab gab at gorge.net
Sun Jul 28 15:42:21 EST 2002


Kai asked:
> I have come to accept that lots of people have trouble with the TMTOWTDI 
> aspects of Perl, but I don't really "get" that. Can someone explain it to 
> me? How is having multiple options difficult, or annoying, or 
> uncomfortable, or whatever? Heck, I obviously can't even see what it is 
> about the multiple options that's unwanted!

Well, for me, it is a case of I need to do X, and I look in a few
{books|websites|ng archives] and find several different examples of
something very similar to X, none of which work for me, so I end up
dinking with my code until it does work, yet I don't necessarily
understand _why_ what I did makes it work.  (This is changing the more I
work with the language, there is hope.)  This is very unsettling for
me.  I like to know how it works, not just that it does work.  The "more
than one way to do it" makes it more difficult (for me) to figure out
what perl expects from me as a programmer, if that makes sense.

Also, the "more than one way to do it, yet this way is good and this
other way is bad" makes things really confusing.  It is difficult for me
to sort out the "it's bad because it's not the way I'd do it" from the
"it's bad because in such-and-such a situation, x will be undefined and
you won't read in the rest of your input" or something like that.  There
was a discussion at a recent local perl group about this, and this is
what prompted my original question--I knew I'd get a straight answer
here. :)  I am currently wading through "Effective Perl Programming" and
hope that it will shed some light on this.

Jenn said:
> I don't write in Perl because I would like to be able to come back to my
> own code six months later and be able to read it. Or be able to
> understand a page of someone else's code without having to have the Perl
> pocket reference in my hand.

Exactly!  I have taken to documenting my code extensively with notes
about why I did something the way I did, and html references to perl
faqs|docs|tutorials.  It helps, some.

gabrielle




More information about the Techtalk mailing list