Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Oh, and if you argue "but adding no strict; isn't that much work", then I counteract with use strict; is only one character more - so, it's not much work, is it?

Hmmm, very strange argumentation. Having strict on by default would need 12 characters less (including the final newline), and that for everyone who thinks that strict mode is a good idea, as opposed to the few people still working with Perl4.

Having strict on would break a lot (but propably not all) of ancient Perl4 code, and for a good reason: New version, new rules. If you want to run Perl4 code, use a perl4 executable. Or add no strict; or a hypothetical use perl4;. Or port the code to Perl5.

One could discuss to turn on strict mode only for "real" scripts, and not for quick command line hacks (perl -e ...).

And the same applies to the step from Perl5 to Perl6. Yes, I'm aware that a Perl5 mode for Perl6 is at least discussed, if not planned or already implemented.

And yes, I'm aware that this discussion won't change Perl5, and it's too late now to change Perl5 to have strict mode on by default. But at least we can learn this lesson for Perl6.

With the new operators for 5.10, we see a very similar problem: Backwards compatibility at every cost, even if it makes writing modern Perl harder. Modern::Perl is a pretty neat idea, but it is not a core module and it cures the symptoms, not the root cause.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^2: use strict by afoken
in thread use strict by scorpio17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found