I'm part of a coding project that's written in Perl.
We've acknowledged the world's moved on, plus Perl allowed (sometimes encouraged!) some crummy coding habits.
So the general consensus is we're gonna migrate code to Python.
I didn't realize till today that Python can't be configured to demand variables be declared before use; there's no analog to "use strict vars".
In Perl, it's awfully bad practice NOT to set "use strict", and our defect rate definitely improved as we moved more of our codebase to set it.
What's the rationale behind Python's choice not to allow the dev to force variable declarations?
We've acknowledged the world's moved on, plus Perl allowed (sometimes encouraged!) some crummy coding habits.
So the general consensus is we're gonna migrate code to Python.
I didn't realize till today that Python can't be configured to demand variables be declared before use; there's no analog to "use strict vars".
In Perl, it's awfully bad practice NOT to set "use strict", and our defect rate definitely improved as we moved more of our codebase to set it.
What's the rationale behind Python's choice not to allow the dev to force variable declarations?