in reply to Re^2: counting number of occurrences of words in a file
in thread counting number of occurrences of words in a file
Adding it to my normal habit has made me a better programmer, because it causes me to think about the constraints it imposes while I am writing code (especially the required scope for variables). And as mentioned above, it also makes it easier and quicker to get my code to work as intended, because it catches mistakes that might otherwise be hard to spot.
The only time I don't use it is when I am doing spontaneous one-liners at the shell command line, because in that situation, compactness carries greater value, and the code I need is relatively short and simple (requiring few if any variables). But every script that I store as a file has "use strict" in it.
|
|---|