Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Learn from what's out there!

by dragonchild (Archbishop)
on Oct 16, 2003 at 13:38 UTC ( [id://299741]=note: print w/replies, xml ) Need Help??


in reply to Learn from what's out there!
in thread use sloppy ;-)

strict deals with things that almost always aren't what you want to do. But, strict robs the ability of the experienced developer to do cool things. This is why no strict; and no warnings 'blah' are there. All my Exporter modules have the following at the top:
package Something::Or::Other; use strict; use warnings no warnings 'once'; # Stuff here 1;

The 'once' item is one I don't want in a values repository. But, I don't use the no warnings 'once' item in my scripts because I should be using all my variables more than once. (If it's a repository, it should be in an Exporter module.)

The same goes double with strict. The only strict item I ever turn off is 'refs', but I turn it off a lot, in specific situations when I really do have to use soft references. But, I know why I'm using soft references and I am planning on using soft references. Everywhere else, I'm too lazy to keep track, so I want the compiler to keep track for me, so I turn strict on.

Soft references are dangerous in every situation ... just in most of them. So, if they were always errors, a lot of code wouldn't work. (Like, the code in Exporter, the most commonly used non-pragma module in Perl.)

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re: Learn from what's out there!
by DentArthurDent (Monk) on Oct 16, 2003 at 15:47 UTC
    So is the point of strict, then, to take the rope out of the hands of a programmer so that they can't hang themselves? I guess there's a place for that. I withdraw my objection. :)
    ----
    May your tongue cleave to the roof of your mouth with the force of a thousand caramels.
      The point is to provide automated rope-removal, should the programmer want it. It's all in the spirit of TIMTOWDI.

      ------
      We are the carpenters and bricklayers of the Information Age.

      The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

      ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-26 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found