On Thu, Feb 15, 2001 at 11:14:01PM -0500, [EMAIL PROTECTED] wrote:
> Was this trip really necessary?

> I've argued why warnings should be on by default (except in one-liners)
> and lost.  Its all been said, guys.

hmm. It seemed like the argument went pretty good this time around.

> Even with warnings on, they are all too often ignored.  Just today I
> got an email from a friend asking "why doesn't this program work"?
> The program was throwing a warning, but he'd ignored it.  Turns out it
> was one of the problems.  And he's no newbie.

yeah, there are programmers and there are people who contribute to CPAN.
I'd say they were a separate subset.

> Taint by default is just right out, I would hope this would be
> obvious.  Any program which takes, say, a filename from the command

agreed. I pointed out this before.

> strict by default is right out.  That's not the sort of language Perl is.

that's no argument. That's a solipsism.

> I'm the bloody QA chair and I don't even think its a good idea anymore.

what difference does that make?

> The idea of auditing other's code (CPAN for instance) is WAY more
> complicated than just "you must use taint, warnings and strict".  750

of course it is. I never said that it would solve all the world's problems.

> megs of code from 1000+ authors around the world, there's no way in
> hell you can enforce such simplistic and arbitrary standards.  See
> http:[EMAIL PROTECTED]/msg00148.html for some
> ideas.

I'm not asking to enforce any 'standards'. Like I said, there's no way I can
stop anybody from putting 'no warnings' or 'no strict' at the beginning of 
all their files. But I do expect a effort on their part to say, come up with
a policy towards warnings, and strictness.

Basically, I want '-w' back as a useful tool.

> Now, there are numerous ways to enforce good style on your local
> development environment.  You can replace perl on your production
> machine with something that does "perl -Mstrict -Tw" if you really
> want (be prepare to watch lots of modules break internally under
> taint).  

Exactly. That's the point - everything breaks. I don't want people to be 
forced to 'use strict' and 'use warnings'. All I want is their files to have
a POLICY towards 'use strict' and 'use warnings'.

Again, I want '-w' back as a useful tool. 

I looked through the discussion lists, and this was never addressed. If it was,
and I overlooked it, I'm sorry. 

> tools available and in the works (Dunce::Files for one, more on the
> way).  You can add to your default Makefile.PL a simple scan for "use
> strict", etc...  You can use a test & review enforcement system such
> as Aegis.  Set up code standards and enforce them with a scanning
> program.  Test coverage analysis is being built into Test::Harness,
> etc...

> You have to do all this anyway, flipping a few command line switches
> isn't going to solve fundemental software engineering problems.  Yes,
> it would be nice if warnings were on by default, but it has too many
> caveats.  Its also all to easy to be shut off (and don't think that's
> not the first switch a newbie will find).

Of course, I wouldn't mind if the newbie found the switch. Ultimately, I bet
lots of the newbies outgrow the switch though. And note that the switch
is there and *WELL ADVERTISED*. Not hidden in the docs.

> Supply your own discipline, don't make the language do it or you will
> be sorry.  (Devo moment... "Freedom of choice is what you got, freedom

But that's the point. You *are* supplying your own discipline. You are 
proactively stating by using '-q' that you want do have *lax* discipline, more
lax than the perl interpreter has to offer by default.

> from choice is what you want")  And please avoid the temptation to drag
> this point ad nauseum.

If you actually reply back towards the new points, then I'll agree with you and 
stop.

So - how about it? As I see it, the new points are: 

        1) the fact that forgetting 'use strict' is painful and forgetting 
           the proposed '-q' or '-z' is painless.

        2) the fact that I'm NOT trying to hide '-q' from users, but advertising
           its existence upto the point where it comes along with every single
           perl command that has errors for the beginning two iterations of 
           perl.

        3) the point that I am not aiming for a software standards but 
           for the modules on CPAN to have a strictness and warnings *policy*.
           We are talking apples and oranges here between your proposal and 
           mine.

        4) that '-w' is fundamentally broken as it stands and has to be fixed. 

In addition, I think that the whole idea of 'upgrade NOTES' is something worth
exploring. I didn't see it in any of the RFC's: the idea is that any changes
made to syntax between perl5 and perl6 will generate a NOTE that explains 
the difference between the two - and gives a pointer to some documentation 
explaining the change.

And don't dismiss 1 as trivial. I personally have spent hours tracking down 
simple bugs that I otherwise would have found within SECONDS with 'use strict'.

Moreover, I'll say one final time that your 'multitude of methods' for 
ensuring strictness policies and they are complete bunk. I've tried them. 
They don't work for the exact reason that 3rd party modules don't have a 
policy towards strictness or warnings. And its a royal pain in the ass. 
This is what 'strictness by default' is trying to fix.

Look - you can't just claim topics 'off limits' if someone's got something
new to say, listen to them and reply to *it*.

> Instead of Yet Again arguing back and forth on this, go write me some
> code auditing tools.

hey, but this fight is worth fighting.

Ed

Reply via email to