develooper Front page | perl.perl6.language | Postings from December 2004

Re: Required whitespace issues.

From:
Rod Adams
Date:
December 5, 2004 08:01
Subject:
Re: Required whitespace issues.
Message ID:
41B33108.1010606@rodadams.net
Larry Wall wrote:

> <>On Sat, Dec 04, 2004 at 08:55:00PM -0600, Rod Adams wrote:
>  
> : $x ==<$foo>; # $x == <$foo>; $x = =<$foo>;
> : @x <==<$foo>; # @x <= =<$foo>; @x <== <$foo>;
> : $x//=<$foo>; # $x // =<$foo>; $x //= <$foo>;
> : $x**=@y; # $x ** =@y; $x **= @y;
>
> In each of those cases the longest-token rule comes into effect.
> That's not only consistent, but standard CompSci for the last 30 years
> or so. The only person who will get burned on those is someone who
> insists on *not* putting whitespace in front of unary = when it would
> be ambiguous. I have negative sympathy for such people. 

<>Well said!

Although I by no means dispute that longest token rule is a long term 
standard in language design, I will claim that many programmers, 
including myself before this, are unaware of it.

So I will now change my concerns to:
"The longest-token rule needs to be mentioned in S03, and explained in a 
future perlop.pod."

-- Rod Adams






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