Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Never, never, never

by FitTrend (Pilgrim)
on Apr 22, 2005 at 19:31 UTC ( #450548=note: print w/replies, xml ) Need Help??

in reply to Never, never, never

What I find interesting about this node is that "never, never, never" is purely the opinion of a programmer. I agree that some methods are not optimal, but isn't perl designed to allow you the freedom to write code the way the programmer understands it?

If it accomplishes your goal, its easy to maintain, and it doesn't crush your server or cause other problems, then do it.

Replies are listed 'Best First'.
Re^2: Never, never, never
by perrin (Chancellor) on Apr 22, 2005 at 19:55 UTC
    Relativism only goes so far. There are many things you can do in Perl that are nearly always wrong, and telling people not to do them is a community service. TMTOWTDI is not a license to write terrible code.
Re^2: Never, never, never
by ktross (Deacon) on Apr 22, 2005 at 19:37 UTC
    Largely I agree with you, perl is the embodiment of TMTOWTDI; but there are some security related 'never,never,never's that are good standard coding practices. One example would be never to eval unchecked user input.

      On the other hand, that is exactly the point of a REPL (Read Evaluate Print Loop), like as perl -de1.

      There is a time and a place for everything -- but times when you should eval unchecked user input are fairly rare rel to the number of times that it looks like it might be a good idea.

      For example, interactive agents of mine often have an "evaluate this" command... but only if they are single-user, or first check if it is me.

      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://450548]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-09-26 12:55 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (294 votes). Check out past polls.