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

Re: [PATCH] Interesting syntax idea

Thread Previous
December 30, 2000 11:39
Re: [PATCH] Interesting syntax idea
Message ID:
In article <>,
	Simon Cozens <> writes:
> On Fri, Dec 29, 2000 at 02:34:04PM +0000, Simon Cozens wrote:
>> +# Testing DWIM of foo = bar;
>> +sub foo : lvalue {
>> +    $a;
>> +}
>> +open bar, ">nothing" or die $!; 
> This might cause people to wonder why I didn't test the case where
> you have a name representing both a filehandle and a subroutine.
> The answer is, you can't (yet) do that. This is pretty weird:

Unless you can find a way to make both work, this is for me a sign
that you should choose one of the two. Otherwise you get interesting
action at a distance effects. e.g. first foo=bar works, then in 
some completely different part of the program a filehandle foo and bar
is set up (maybe even properly localised), and suddenly foo=bar stops
working or does something different. And that kind of action at a
distance is evil.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About