in reply to Re: Why isn't C<use strict> the default?
in thread Why isn't C<use strict> the default?

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....

  • Comment on Re^2: Why isn't C<use strict> the default?

Replies are listed 'Best First'.
Re^3: Why isn't C<use strict> the default?
by bwelch (Curate) on Oct 28, 2004 at 13:21 UTC
    "...people that start coding in perl aren't even going to know that 'use strict' exists, and will end up creating sloppy code"

    This seems to be true for much of the code I end up inheriting. Whenever I am given code, two tasks are created:

    1. Add use strict;
    2. Run perltidy, specifically "perltidy -nolq -pt=0 -bbb -bl"
Re^3: Why isn't C<use strict> the default?
by Anonymous Monk on Oct 28, 2004 at 12:35 UTC
    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
Re^3: Why isn't C<use strict> the default?
by Aristotle (Chancellor) on Oct 29, 2004 at 08:24 UTC

    99% of people that start coding in perl aren't even going to know that 'use strict' exists

    That sounds like a failure of introductory material and instructors, not one of the language itself.

    Makeshifts last the longest.

      99% of people that start coding in perl aren't even going to know that 'use strict' exists

      That sounds like a failure of introductory material and instructors, not one of the language itself.

      It also sounds more like a daring assumption than like a proven fact.

      Cheers, Sören

Re^3: Why isn't C<use strict> the default?
by Anonymous Monk on Oct 28, 2004 at 12:00 UTC
    So, you don't like the culture of Perl and you want to change it? You want to change the way 99% of the people are coding Perl? You think this is good for the language or its culture? Enlighten us, please!

    AM sits back with some popcorn, awaiting a show with lots of unfounded statistics

      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..

        Trying to debug on maintain code that isn't properly indented is a nightmare to maintain as well. Should that become mandatory as well - only being able to be turned off by putting some voodoo on top of your program? I mean, the first thing Perl programmer say what their opinion is about Python is "horrible white space rules". Yet we all think that indentation is good, and still we find it a horror if the language mandates it by default.