Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
XP is just a number
 
PerlMonks  

RE: My crime of choice

by BigJoe (Curate)
on Oct 12, 2000 at 21:55 UTC ( #36456=note: print w/ replies, xml ) Need Help??


in reply to My crime of choice

I get too lazy when just writing quick scripts for personal use. It takes to long to type

use strict;
when your script is only like 5 lines. And who needs formatting when its done it gets deleted. Maybe if my boss will let me write some worth while scripts I might change my tune.

--BigJoe

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


Comment on RE: My crime of choice
Download Code
RE: RE: My crime of choice
by princepawn (Parson) on Oct 12, 2000 at 22:12 UTC
    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."
      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

      --BigJoe

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

        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)

        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 http://dev.perl.org/.

        Alakaboo

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://36456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2014-04-16 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (424 votes), past polls