in reply to RE: My crime of choice
in thread My crime of choice

Maybe there should've been
use dangerously_fast_and_loose;
And use strict was on by default. It would've saved Tom and Randal on comp.lang.perl.misc saying to me for the 500th time: "You would've caught that error if use strict had been on. Use strict. Strict is your friend."

Replies are listed 'Best First'.
RE: RE: RE: My crime of choice
by BigJoe (Curate) on Oct 12, 2000 at 22:21 UTC
    Maybe we shoulda submitted that to Larry Wall for Perl 6.0. It would be a good feature have it on by default maybe with some other newbie flags set then have
    use expert_mode;
    for people to shut off the newbie flags


    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.

      I'm almost certain someone RFCd that for Perl6, although a quick scan of the RFC list yields nothing. I know for a fact it was discussed in the language mailing lists. Actually, there was a whole sub-list working group for the strict pragma!

      Perl6 RFC #16, by Daniel Chetlin makes the argument that the strict pragma should be left more or less the way it is. Here is a brief synopsis of his reasoning, which was echoed in the mailing lists when the scenario of turning strict on by default was suggested:

      =head1 ABSTRACT Perl5 is usable with no hassle as a quick-and-dirty problem-solver by default. It is ideal for one-liners, short scripts, and quick hacks that have no need for extra protection or error-checking. It is also great for large projects by making use of the C<warnings> and C<strict> pragmas. Perl6 should not make the one-liners, short scripts and hacks need to jump through extra hoops to get the "lax" behaviour which is default in Perl5; the point of using Perl as a quick-and-dirty tool is that you don't have to do anything extra.

      You can view the RFCs and mailing list archives at


      Strict is _not_ a newbie pragma. Together with 'use warnings;' or '-w' it can save you hundreds of hours of debugging. When I'm interviewing a prospective applicant for the shop I work at, and I look at the applicant's code, a failure to use strict is almost always grounds for a negative recommendation. It's simply irresponsible practice to program without it. You don't need an 'expert_mode' pragma, BTW. There's already a 'no strict;' that you can turn off for blocks in which you're going to be using symbolic references or something. I agree that strict should on by default, but one of all of my 5-liners will always be 'use strict;'.

      As long as it defaults to off for perl -e ...

      And short scripts I have all over my HD from the past 5 years that were written using autovivification of globals because they are only 10 or 15 lines long.

      Oh wait, that may too much DWIM for one program.

      $you = new YOU;
      honk() if $you->love(perl)