Re^2: Why isn't C<use strict> the default?
by BrowserUk (Patriarch) on Oct 28, 2004 at 13:11 UTC
|
It just struck me reading yet another "I haven't quite yet made the leap to using strict and my..." story of woe that if it were made
an aweful lot of newbies would have been saved an aweful lot of pain by not building the seemingly insurmountable "barrier of experience" to using strict.
Ce la vie. History shows, but rarely shows it well.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] |
|
Exactly... I really struggle to see who we're protecting with this backwards compatability issue. There's basically two groups
- People who download a script from somewhere that doesn't run under use strict
- People who are running applications that don't run under use strict (they are either old, or poorly written), and decide to upgrade their version of Perl without doing any testing.
It seems to me there are simple solutions for both groups (either don't upgrade, or turn off strict).
Do we really want to protect these groups to the detriment of everyone else?
| [reply] |
|
You don't have to struggle. Backwards compatiblity has always been one of the primary goals
and is not going to change any time soon.
If you want strict on by default distribute your own perl.
| [reply] |
|
Why is it that you want others to suffer the burden? Who are you that you think it's easy for others to change their programs? You have no fucking clue how many programs will break, how many companies will use that as an excuse to no longer allow Perl to be used, or how it will hurt Perl as a movement.
Anyway, you don't have to convince one AM. You'd have to convince p5p or Larry. And I'm willing to bet a significant amount of money that it ain't going to happen.
Of course, you are free to patch your own version of perl.
| [reply] |
|
Build a language aimed at newbies, and only newbies will use your language.
| [reply] |
|
| [reply] |
|
|
|
|
|
|
Re^2: Why isn't C<use strict> the default?
by Mutant (Priest) on Oct 28, 2004 at 11:03 UTC
|
It's a LOT more than the price of a few keystrokes... it's the whole culture of Perl. 99% of people that start coding in perl aren't even going to know that 'use strict' exists, and will end up creating sloppy code (ever noticed that Perl has a reputation for being messy - this is exactly why).
And as I said above, backwards compatability issues can be resolved in a number of ways....
| [reply] |
|
| [reply] [d/l] |
|
And as I said above, backwards compatability issues can be resolved in a number of ways....
You suggestion is unacceptable.
You want strictures on by default,
alias /usr/bin/perl to /usr/bin/perl -Mstrict
| [reply] |
|
| [reply] |
|
| [reply] |
|
| [reply] |
|
Maybe you've been lucky enough to only come across code which has been written under use strict. Trying to debug or maintain code that isn't is a nightmare.
The fact is (and no, I don't have statistics to back this up, but I'm sure there's questions relating to this in the PerlMonks faqs) that far too many people code without use strict when they should be. Then, they end up with a whole lot of issues, and think Perl's to blame. In fact, it's not Perl, it's the lack of strictures. If use strict was on by default, these people would learn to code in Perl properly in the first place, and save a whole lot of pointless questions on Perl Monks..
| [reply] |
|