On Wed, Sep 20, 2000 at 07:45:16PM -0000, Perl6 RFC Librarian wrote:
> "VARIABLE used only once: possible typo" should be replaced with
> warnings on uses of uninitialized variables (including lexicals).

>  $x = 3

I don't understand, who's to say you didn't misspell $x?  If you're only
using it once wouldn't that be likely?  Who writes a program consisting of
only assignments to variables that are never used, and expects not to see
the "VARIABLE used only once: possible typo" warning?

 
> complains, but
> 
>  $x = 3; $x = 3

As it shouldn't; you've mentioned $x twice, which means you probably didn't
misspell it.  That your mentioning twice in this manner is silly is beyond
perl's grasp.

 
> does not, nor does
> 
>  my $x = 3

I would say that this should complain just as $x = 3 would.

 

> Note that if you currently depend on lexical variables having
> undefined values, you would need to change C<my $x> to
> C<my $x = undef>. This is a good thing.

Whoa, are you saying that saying 'my $x' no longer means $x has the value
undef?  What value does it have?  How can this be a good thing?


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to