Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: RFC: Tutorial: use strict; now what!?

by sundialsvc4 (Monsignor)
on Feb 08, 2012 at 22:03 UTC ( #952597=note: print w/ replies, xml ) Need Help??


in reply to RFC: Tutorial: use strict; now what!?

I agree with the sentiments expressed here, including the use (not mentioned) of use warnings.   Basically, I think, the idea is to force as many dumb mistakes to be detected “at compile time” as possible.   When you are writing thousands of lines of code, little will typos creep in that you didtn recognize at the time.   And the time that you want to detect those isssues is, right now.   The computer has the amazing ability to detect the slightest inconsistency, and you want the computer to be doing everything in its power to assist you in that regard.   It will never encounter “Paris in the the spring” without instantly flagging the extra “the.”   But did you, while reading this, encounter every one of the five tpyos I put in here?   (If your browser underlined them for you, it doesn’t count.)

If you find that you must use a construct that flags a warning, you can use the no construct, and liberal and detailed comments, to explain exactly what you are masking-out and exactly why.   (You will not remember, even with regard to your own code.)   Then turn the feature right back on as soon as possible.


Comment on Re: RFC: Tutorial: use strict; now what!?
Re^2: RFC: Tutorial: use strict; now what!?
by JavaFan (Canon) on Feb 09, 2012 at 10:12 UTC
    But did you, while reading this, encounter every one of the five tpyos I put in here?
    I didn't! And yet, I fully understood what you were trying to express. I vastly prefer to autocorrecting my mind does (without even being aware of it) of your readings than throwing an exception on each of your typos.

    So, for me, your argument is really "if you prefer 5 interrupts when reading a single paragraph, instead of just do ing the right thing, use strict; is just the tool for you". Now, don't get me wrong, I often use strict myself, but I find your "spotting the typos" example a very convincing argument.

      I assume your reply was quite clever intentionally. All your arguments seem to be against his typo metaphor, yet you conclude by saying that it is "very convincing".

      Sure, I could conclude that your presumed error was done intentionally to further illustrate your point. However you have also included so many other errors (relative to word count) that my own mind threw several exceptions while reading your response. Thus the syntax of your argument against his metaphor actually supports it. So what meaning were you truly trying to convey?

      I'm reminded of Paul Atreides thoughts on Harkonnen plotting: "plans within plans".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-04-18 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (463 votes), past polls