Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Tales from the Crypt, 'use strict' Horror Stories

by gmax (Abbot)
on Nov 17, 2003 at 15:11 UTC ( [id://307682]=note: print w/replies, xml ) Need Help??


in reply to Tales from the Crypt, 'use strict' Horror Stories

Anyone got any good horror stories about 'use strict'?

Sorry, I don't.

As I consider myself to be a good listener, I started using strict from my very first script.

However, I have many horror stories of trying to find a mistake in scripts written by somebody else, without "use strict" at the top.

And yes, 9 out of 10, after working my way through hundreds of error messages, I found the mistake, which usually turned out to be a misspelled variable.

What's your point? Are you trying to say that "use strict" is bad for your development time? If so, I'm afraid that you are barking at the wrong tree. The majority of the Monks could tell you many reasons why "use strict" can make you save development time, not the other way around.

Programmers who don't use strict sooner or later run into trouble, and then they have to call somebody who makes money out of their carelessness. How about this for an horror story? BTW, would you like to play Dracula or the Vampire Hunter?:)

I should also add some good references to the reasons:

 _  _ _  _  
(_|| | |(_|><
 _|   
  • Comment on Re: Tales from the Crypt, 'use strict' Horror Stories

Replies are listed 'Best First'.
Re: Re: Tales from the Crypt, 'use strict' Horror Stories
by ptkdb (Monk) on Nov 17, 2003 at 15:20 UTC
    Quite the opposite. 'use strict' costs seconds in the short term to add it and fix the resulting messages, but saves HOURS in the longer term.

    I'm trying to elicit "don't let this happen to you" tales, to encourage people to use it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found