in reply to Ovid's "Please Stop Using Perl 3"

This reply really opened my eyes to something. I'd always been an enthusiastic proponent of TIMTOWTDI, but now I think I might stop. While there are usually many ways to do something, there usually is one or two ways that are superior to the rest, either in form or function (or both). I think these solutions need and deserve to be promoted over the rest.

This feels very foreign to me after so much TIMTOWTDI, but I think I'm going to start promoting The Right Way To Do It (TRWTDI).

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: Ovid's "Please Stop Using Perl 3"
by Tanktalus (Canon) on Sep 06, 2006 at 03:33 UTC

    If that is something you are interested in, you may take notice of a previous meditation on a very similar subject. I disagreed with that one, too.

    As a counterpoint was a recent challenge of mine. Though spiritway basically said the same as you, davido's response was bang on: there is much to be learned when exploring corner cases.

    The thing to always remember is that, while there are some really truly bad ways to do some things (see the above thread for some hideous examples ;-}), you need to know lots of ways to do something because what you did last time as part of a simple application may not apply in a CGI environment, or a client-server environment. With encryption. Or tainting. A key point of TIMTOWTDI is that there is also more than one scenario in which you may want to do it. And thus the "superior" answer for last time may be second-rate in the new environment. Luckily, knowing so many ways to do something means I can adapt something a bit different for this one.

    PS: You should always use The Right Way for your scenario. I'm just saying that you should know many ways so you can evaluate them and pick the real right one, not the right one for a different scenario.

Re^2: Ovid's "Please Stop Using Perl 3"
by jdtoronto (Prior) on Sep 06, 2006 at 04:06 UTC
    There is more than one way, and there can be more than one right way. Notice I said, 'can'. I have spent some time lately reading and re-reading portions of thedamian's "Perl Best Practices". I don't always agree 100% with what he has to say, but he argues it well and gives good sound reasons for adpoting the practice he prescribes. Some years back I took much advice from merlyn and Joseph Hall in "Effective Perl Programming" for the same reasons.

    The biggest problem I see is that the arguments against Perl are often made by fad followers who have never used the language! And then the perpetrators of some truly horrible code are pronounced heroes by a seemingly ignorant few.

    In my estimation, one of Perl's biggest problems is also its greatest strength. It is readilly available and approachable by most people with only slightly more than a passing interest in programming. Thus resulting in a series of public archives and references that are a great ego boost to the authors, but a mill-stone arund the neck of many others in the community.

    jdtoronto

Re^2: Ovid's "Please Stop Using Perl 3"
by phaylon (Curate) on Sep 07, 2006 at 10:59 UTC
    Proposal: The Right Ways To Do It.

    One right way will lead to one way, one way will lead to *THE* way. and *THE* way is not always right.

    Ordinary morality is for ordinary people. -- Aleister Crowley