4 ms·
This is why use strict in Perl is such a godsend because it catches all variable name typos at compile time. Update: Just noticed you said type and not typo re
by draegtun 14y ago
This is why use strict in Perl is such a godsend because it catches all variable name typos at compile time.
Update: Just noticed you said type and not typo related! Still use strict does catch a lot of silly errors that unfortunately do slip into code with other dynamic languages.
- crntaylor 14y agoI think he meant 'typo' rather than 'type' - it was probably a type.
- deleted 14y ago[deleted]
- PommeDeTerre 14y agoNo, I meant "type", exactly as I wrote it. I was not referring to situations where the programmer accidentally types a character or two incorrectly, without realizing it. I'm talking about cases where the programmer intentionally writes code in a certain way, but does not realize it violates a type constraint of some sort. Maybe he passes a string to a function that expects a numeric value. Or maybe he renames a method, but misses one invocation. You get the idea. Please don't assume that what was written was wrong, especially when it wasn't.
- crntaylor 14y agoIt was a joke. Notice how I deliberately mis-spelt 'typo' in the second sentence.