Perl: the Markov chain saw | |
PerlMonks |
Re^3: Why isn't C<use strict> the default?by Aristotle (Chancellor) |
on Oct 29, 2004 at 12:39 UTC ( [id://403715]=note: print w/replies, xml ) | Need Help?? |
Yes, your "sports mode" analogy certainly is much less faulty than some others, but that doesn't make it very precise. It cannot convey one-liner vs application, and it shears completely once you start considering that you can very well use modules written to run under strictures in one-liners (LWP::Simple, anyone?), and ever more so since such a module might itself be using other modules that are not written to run under strictures… But it wasn't my aim to dispute each metaphor individually.
I never claimed otherwise. I did say that the overwhelming majority of the teaching material available, whether that be for those who learn by example of for those who learn by lesson, teaches bad habits. Defaultifying strictures will not change that. Even if use strict; was to be the default from now on, most novices will still end up having to unlearn bad habits, because we have a huge legacy of bad habits in the wider Perl culture. Some of it is even built right into Perl — just look at all the globals that control I/O behaviour. This can't all just change overnight. I understand your concern and I certainly do wish we could teach everyone good practice right off the bat, so they would make both their own and our lives easier. But to think that just enabling strictures by default is all that this will take is vastly oversimplifying the matter. And that legacy gives us an unfortunate and unwelcome but nevertheless very real reason not to default to strictures. Sometimes, reality just bites. Here's hoping that the community's rewrite of the community will improve matters. Makeshifts last the longest.
In Section
Meditations
|
|