|XP is just a number|
Re^2: use strictby afoken (Prior)
|on Jan 26, 2010 at 15:46 UTC||Need Help??|
Oh, and if you argue "but adding no strict; isn't that much work", then I counteract with use strict; is only one character more - so, it's not much work, is it?
Hmmm, very strange argumentation. Having strict on by default would need 12 characters less (including the final newline), and that for everyone who thinks that strict mode is a good idea, as opposed to the few people still working with Perl4.
Having strict on would break a lot (but propably not all) of ancient Perl4 code, and for a good reason: New version, new rules. If you want to run Perl4 code, use a perl4 executable. Or add no strict; or a hypothetical use perl4;. Or port the code to Perl5.
One could discuss to turn on strict mode only for "real" scripts, and not for quick command line hacks (perl -e ...).
And the same applies to the step from Perl5 to Perl6. Yes, I'm aware that a Perl5 mode for Perl6 is at least discussed, if not planned or already implemented.
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.
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. Modern::Perl is a pretty neat idea, but it is not a core module and it cures the symptoms, not the root cause.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)