Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

RE: RE: Re: Regex reset problem?

by PipTigger (Hermit)
on Jul 09, 2000 at 10:07 UTC ( #21687=note: print w/replies, xml ) Need Help??

in reply to RE: Re: Regex reset problem?
in thread Regex reset problem?

You two should relax. There's many a way to do things... and if they werk correctly... well can they be wrong? Maybe some hackers are too lazy to type those things or to even deal with the occassional messages that they produce. Maybe they're afraid of them or don't like them or ... have no good reason at all like me. =)

Maybe you (and others) fundamentally object to my opinion (even on particularly informed and experiential grounds) but I feel that the level of warnings and strictness any PerlMonk would like to adhere to is a personal decision that should not be belittled. If there is a more enlightened way, please kindly explain how and why. Otherwise, your assertions seem elitist and shallow... at least to me. Please don't take this as any sort of kerosene-wielding confrontation but rather an opinion and an interested query for further explanation (as well as the hope of increased tolerance). Thanks very much. TTFN.


p.s. the most cigarettes

Replies are listed 'Best First'.
RE: RE: RE: Re: Regex reset problem?
by Aighearach on Jul 09, 2000 at 18:40 UTC
    The reason is, because nobody who has spent much time coding has been spared from the rare (or for some of us, not-so-rare) typo. regardless of how we would like things to be, we all accasionaly make little mistakes, typographical, syntactical, or structural. With use strict and use warnings you can catch most of this right away. It is precisely laziness that prompts strict adherance to strict. Maybe I'm just a complete moron, but I have spent 4 hours just on a single typo that strict would have caught, and that's certaily more time than I've spent typing pragmas.
    Paris Sinclair    |    4a75737420416e6f74686572    |    205065726c204861636b6572
    I wear my Geek Code on my finger.
      Thanks Aighearach! I don't see why I'm voted down for saying that some people don't want to use some optional feature and that it's okay to choose that if they want to. My point was just that "even if it's right, just saying so without explaining it does little good". I guess I'm a crackpot who deserves all the -- votes coming my way but I can't help but think an increased dose of tolerance for different practices or experience levels in the Monastery would do us all good. Shalom.


      p.s. Initiate Nail Removal Immediately!

        use strict and -w (use warnings) are optional (although Larry has been quoted as saying that this is a bug in Perl!) You are, of course, quite at liberty to to use or not use these as you feel appropriate.

        The problem comes when someone not using these aids finds a bug in their script. They then post non-strict code here (or on comp.lang.perl.misc) and ask for help when in many cases just adding use strict or -w to their script would help them find the bug far faster on their own.

        In summary - don't use these tools if you don't want to, but if you're going to ask other people for help, it's only polite to ensure that your script is 'strict-clean'.


        European Perl Conference - Sept 22/24 2000, ICA, London
(chromatic) RE: RE: RE: Re: Regex reset problem?
by chromatic (Archbishop) on Jul 11, 2000 at 07:17 UTC
    One reason is because I don't want to debug a variable-name typo that those defensive practices would have caught in ten seconds... and I'm sure people don't want to have their posts here ignored.

    Besides that, I've learned more about Perl by having to take code that barely works and make it pass the strict test.

    There's a minimum standard of posting here that we really ought to take into account. People should be able to pare down their code into the smallest snippet that illustrates the program. They need to provide the exact error messages they encounter. They ought to format it nicely. They should list what they've already tried, if applicable. If they're running CGI scripts, they must use Taint mode.

    Given all that, I don't think typing an extra 15 characters per script is an unreasonable burden. Take taint mode, for example. I wouldn't hire any CGI programmer who doesn't use -T because it's his "valid personal decision". Sure, it may work now, but when things fall apart in the future, having saved a few minutes writing code will be forgotten.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://21687]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2021-09-17 05:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found