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

Re^2: Writing a better Modern::Perl

by EvanCarroll (Chaplain)
on Oct 07, 2010 at 16:27 UTC ( #864034=note: print w/ replies, xml ) Need Help??


in reply to Re: Writing a better Modern::Perl
in thread Writing a better Modern::Perl

Right, well by extension you could not `use warnings` - because it essentially does the same by enabling :all, and instead you can use each different type of warning explicitly. You could do the same thing with strict too! Even CORE has to make some defaults: $[ defaults to 0.

Other than the extremely weak argument you present, the point I'd like to make is that there is a level of reasonableness to getting better defaults. That comes at the cost of "defaults" - choices being made by someone else that *might* not apply to you, but *may* very well be so crafted as to benefit you in every application.



Evan Carroll
The most respected person in the whole perl community.
www.evancarroll.com


Comment on Re^2: Writing a better Modern::Perl
Re^3: Writing a better Modern::Perl
by moritz (Cardinal) on Oct 07, 2010 at 17:10 UTC
    Other than the extremely weak argument you present

    I don't think JavaFan's argument is weak, and you didn't do anything serious to prove your point.

    Also if you don't respect the opinions of those that answer, why ask for opinions in the first place?

    Perl 6 - links to (nearly) everything that is Perl 6.
      It isn't an argument against nextgen, it is an argument against defaults. Why aren't they your cup of tea? would be the question that would permit me to make nextgen better, unfortunately I didn't ask that. Instead, I brought to light the weak merits of arguing against defaults, and against a method that tried to better them.

      And, not respecting one argument does not mean that I do not respect the opinions of others. I respect that he won't use my module because he prefers to replicate boiler plate code through editor macros (for some value of respect), that doesn't mean that the source argument against implicitly doing what you want is a good one, especially for the perl community.



      Evan Carroll
      The most respected person in the whole perl community.
      www.evancarroll.com
        It isn't an argument against nextgen, it is an argument against defaults.

        Not at all. It was only an argument against modules that change defaults, but don't do anything else. (Which is not a default at all, because you have to do something to enable it. So it's just a policy, not a default).

        Perl 6 - links to (nearly) everything that is Perl 6.
        Why aren't they your cup of tea? would be the question that would permit me to make nextgen better, unfortunately I didn't ask that.
        You cannot make nextgen good enough that I would use it. There are only three pragmas/modules I use in the majority of the code I write: 'use 5.010; use strict; use warnings;'. I write diverse code. Any other module will not be used in the majority of the code I write. Of course, you could have 'nextgen' take arguments, for instance, a list of modules to load - but then I may just sidestep it directly, and use them directly.
Re^3: Writing a better Modern::Perl
by JavaFan (Canon) on Oct 07, 2010 at 18:14 UTC
    I have nothing against defaults.

    However, if you would be happy with the defaults, you wouldn't toss out one module, and write your own with a different set of defaults.

    I know what "defaults" I get when using 'use warnings', or 'use strict'. I also know they are very unlikely to change, and, if they do, it will require a major Perl release. The defaults for 'use strict' haven't changed since 5.000.

    But with Modern::Perl, nextgen, and other modules enabling lexical pragmas outside of their lexical scope, they aren't defaults. The are choices, choices made by the authors. And regardless whether one agrees with the authors choices, for each module you encounter in code you inherit/maintain, you'll have to find out what it does. That takes an effort.

    Writing good Perl code isn't golfed code. Mentioning the pragmas you're going to use in your program only takes a few seconds of typing. IMO, the benefits of mentioning the pragmas your using far outweight the cost of typing a few lines. It's just like comments. I spend quite a few keystrokes on comments. Sometimes, the comments even look like "boilerplate". Guess what, I don't hide that in a module either.

Re^3: Writing a better Modern::Perl
by petdance (Parson) on Oct 10, 2010 at 03:03 UTC

    EvanCarroll: "Hey, can you give me a ride to the store?"
    Friend: "Sure, let's go."
    EvanCarroll: "Dude, your car sucks."

    Asking someone for their opinion, then arguing against it, teaches people that they should not bother responding to your requests.

    xoxo,
    Andy

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-07-30 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls