|No such thing as a small change|
Re^3: use strictby JavaFan (Canon)
|on Jan 26, 2010 at 16:07 UTC||Need Help??|
Having strict on would break a lot (but propably not all) of ancient Perl4 codeI doubt there's a lot of ancient perl4 code laying around. That's not the problem.
It's the unknown quantities of code written in the last 15 years that will break if use strict; suddenly becomes the default. Note that includes oodles of code that runs without problems.
And the amount of code will only grow.
I'm sure you could convince p5p to make use strict; the default if you can show there's not much code out there that would break. But you don't know how much code is out there - and how it's written. Noone knows.
And yes, I'm aware that this discussion won't change Perl5, and it's too late now to change Perl5 to have strict mode on by default. But at least we can learn this lesson for Perl6.Perl6 will have strict on by default. Or at least, it still had that last time I heard someone trying to get me the drink the Perl6 Kool-Aid. But who knows, it may have changed since.
Modern::Perl is a pretty neat idea, but it is not a core moduleWait? You don't mind if other people have to change their, currently working, code, but you find it a problem if a module that helps you write "modern" (for some value of "modern") code is a module that has to be downloaded from CPAN?
With the new operators for 5.10, we see a very similar problem: Backwards compatibility at every cost, even if it makes writing modern Perl harder.Backwards compatibility is very important. And how are the "new operators" keeping you from writing "modern Perl"?
Oh, and if you're so saffy you're writing "modern Perl", you'll be able to write an editor macro that puts "use strict;" in your files for you? I've no clue how to write "modern Perl", or even what it is, but I haven't had a need to type use strict; to get strictness for a long, long time. Two keystrokes, and it says "#!/usr/bin/perl\nuse strict;\nuse warnings;\n". A slight variations, and it does the same with a package statement instead of a she-bang line. I really do not buy the argument "my fingers are wearing out typing 'use strict'".