> Still would be able to do it with `use strict'. My proposal isn't going to
> replace it! As it didn't replace the default global variables! As I said, I
> don't want you to use it or even like it, I'm only wanting YAWTDI.

Right, but your approach isn't going to help in the cases where it is needed 
most, ie: long programs where it *is* nice to have lexical variables. There are
two possibilities here:

        1 - long scripts where you need lexicals
        2 - short scripts where you don't.

In #1, 'use scope' is going to hinder more than help, for the reasons that I
mentioned. In #2, 'use scope' is not needed because you simply don't have strict
on.

> Actually, I think sometimes it can be done with -w (``Variable xyz used only
> once, probably spelling error'').

Right, but what of cases when you are consistantly using the wrong variable.
Or you use it wrong twice. If its not bulletproof, I'd rather not rely on it.

> I'm fond of having an alternative to it, ie. `use scope'. I don't want it by
> default, as I don't want it to replace `strict' either. It would only be
> there for anyone decide if he would or wouldn't use it.

The question is whether or not the pragma is worth the extra complexity in the
parser/implementation that it would add as opposed to the benefit of its being
there. If it was not that difficult to implement, I wouldn't mind seeing it..


> As to turn on by default, I actually don't think making one of this things
> default would be good, because it would make one-liners and small quick and
> dirty scripts some harder to write. For longer scripts and modules (that
> already are many lines long), writing one or two more lines isn't expensive
> at all...

well, I was thinking about this - there really should be an extra switch that
makes this possible, rather than typing 'no strict; no warn;' ie:

#!/usr/local/bin/perl -q # for quick and dirty.

The main rationale behind this is that - face it '-w' is pretty much useless 
now for any module that includes other modules. Why? because you get those 
warnings as well as your own. Even the standard distribution of perl isn't 
free of this behaviour. 

Make them the default, and people will adhere to them. And '-w' will become 
useful again.

And as newbies, they will also get feedback on things that used to be silent and
hence learn faster. 

Ed

Reply via email to