Home > Archive > PERL Miscellaneous > August 2005 > why I gave up -w and "use strict"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
why I gave up -w and "use strict"
|
|
| newyork799-miscperl@yahoo.com 2005-08-26, 3:56 am |
| Well, using warnings were never really a help to begin with. I can
always trigger them with a switch if I want.
Not using strict leads at first to some funny, funny bugs...but it
makes you a stronger programmer...writing short programs you don't need
to declare each variable and if it gets longer or you add mods, just
start adding "my" in the subs and mods.
| |
| Tim Hammerquist 2005-08-26, 3:56 am |
| newyork799-miscperl@yahoo.com wrote:
[ stuff ]
If you need a testosterone fix, and really want to show how
strong a programmer you are, try writing a program of decent
length, *using* strict, and see how many errors you catch
on your own before strictures catch them. When the number is
zero, then you're ready to learn more about perl.
Or did you think variable/subroutine
disambiguation was the final test?
There are times when strictures are superfluous. And even very
rare occasions when they are counter-productive. But you're not
helping anyone, and only hurting new Perl programmers, by
running your mouth off like this.
I'm reminded of Uri's railing against the techniques described
in "Advanced Perl Programming." And he definitely had a point.
In the vast majority of cases, using such techniques is
a questionable choice at best. On the other hand, Perl is all
about choices, TMTOWTDI and all.
The difference here is that, when you're fluent enough in Perl
to cite a *good* reason *not* to use strictures, you hopefully
won't feel the need to brag to the interrweb at large about how
kewl your script skillz have become.
Tim Hammerquist
| |
| Tim Hammerquist 2005-08-26, 3:56 am |
| Tim Hammerquist <tim@vegeta.ath.cx> wrote:
> newyork799-miscperl@yahoo.com wrote:
> [ stuff ]
Apologies to the group for reacting to such an obvious troll.
> I'm reminded of Uri's railing against the techniques described
> in "Advanced Perl Programming."
Following is a link to one of the threads I'm refering to above.
It's a good read, regardless of your personal opinion on the
subject.
http://tinyurl.com/dq4bk [to Google Groups]
Tim Hammerquist
| |
| James E Keenan 2005-08-27, 9:58 pm |
| Tim Hammerquist wrote:
> Tim Hammerquist <tim@vegeta.ath.cx> wrote:
>
>
>
> Apologies to the group for reacting to such an obvious troll.
>
>
>
>
It should be noted that that thread was discussing the *first* edition
of Advanced Perl Programming, not the *second* edition: a completely
different book by Simon Cozens.
Of course, it would be interesting to hear what Uri has to say about
*that* edition as well!
jimk
| |
| newyork799-miscperl@yahoo.com 2005-08-28, 3:56 am |
|
Tim Hammerquist wrote:
> Tim Hammerquist <tim@vegeta.ath.cx> wrote:
>
> Apologies to the group for reacting to such an obvious troll.
oh, oh, oh...why a troll...I am serious...when I was learning Perl to
just recently I always used the -w and "use strict" nonsense on even
the shortest programs...
#!/usr/bin/perl -w
use strict
print "hello world\n";
haha...so it is kind of nice to give that shit up when you don't need
it ;-)
| |
| newyork799-miscperl@yahoo.com 2005-08-28, 3:56 am |
| hey, but also thank you for the reply and the link ;-)
I read through it
| |
| Matt Garrish 2005-08-28, 7:56 am |
|
<newyork799-miscperl@yahoo.com> wrote in message
news:1125209880.621084.82180@g49g2000cwa.googlegroups.com...
>
> Tim Hammerquist wrote:
>
> oh, oh, oh...why a troll...I am serious...when I was learning Perl to
> just recently I always used the -w and "use strict" nonsense on even
> the shortest programs...
>
> haha...so it is kind of nice to give that shit up when you don't need
> it ;-)
>
Only children feel the need to swear when they post.
Matt
| |
| axel@white-eagle.invalid.uk 2005-08-28, 6:56 pm |
| newyork799-miscperl@yahoo.com wrote:
> Well, using warnings were never really a help to begin with. I can
> always trigger them with a switch if I want.
> makes you a stronger programmer...writing short programs you don't need
> to declare each variable and if it gets longer or you add mods, just
> start adding "my" in the subs and mods.
All of which goes to show that you can quite happily programme away
on your own... but no matter how good a programmer you are does
not prevent typos and using 'my' in subs with warnings and strict
switched off does nothing to prevent it.
No serious programmer would dream of omitting a basic step
which might otherwise cause a long time spent in debugging [1] or
an error which would show up in production code.
To even suggest such a thing automatically rules you as either a troll
or an idiot, probably both.
[1] Unless he was being paid by the hour and under an incompetent
manager.
Axel
|
|
|
|
|