develooper Front page | perl.perl5.porters | Postings from April 2000

Re: [ID 20000403.009] uninitialised concatenation???

Thread Previous
From:
Ronald J Kimball
Date:
April 4, 2000 07:55
Subject:
Re: [ID 20000403.009] uninitialised concatenation???
Message ID:
20000404105544.C299251@linguist.dartmouth.edu
On Tue, Apr 04, 2000 at 02:51:12PM +0000, Simon Cozens wrote:
> Ronald J Kimball (lists.p5p):
> >Yes, Tom, we all understand that there are many cases where different Perl
> >syntax is compiled to identical opcodes, and that the interpreter warnings
> >reflect the compiled opcodes and not the original code.
> >But, neither the compiler nor the interpreter is going to fix the Perl code
> >that caused those warnings.  That can only be done by the programmer, and
> >the warning messages should be optimized for the programmer, not for the
> >compiler or the interpreter.
> 
> What are you going to do about this?

I recommend changing the opcode descriptions from 'concatenation (.)' and
'join' to 'concatenation (.) or string' and 'join or string'.


> othersideofthe:simon ~ % perl -we 'my $a; my $b="one"; print $a, $b'
> Use of uninitialized value in print at -e line 1.
> 
> If you're optimising for the programmer, you tell him which variable it is.

Solving this problem would probably be judged too expensive and I doubt a
patch for it would be approved.


Ronald

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About