On Tue, 24 Apr 2001, Michael G Schwern wrote:

> On Tue, Apr 24, 2001 at 12:32:29PM -0400, John L. Allen wrote:
> > I think someone may have mentioned this already, but why not just say
> > that if you want '.' to mean concatenation, you have to surround it on 
> > either side with white space?  If there's no white space around it, then 
> > it is forced to mean method invokation, or whatever else.
> 
> This approaches "whitespace as syntax".  Very few Perl operators care
> about whitespace between their words (even ->) or whitespace at all.
> 
> More generally, its going to cause alot of careful squinting at code
> to distinguish between different operators.  This will lead to subtle
> bugs because someone accidentally put a space after the . and didn't
> notice.

I still think it's a good idea - better than any other proposed so far.

Are we so afraid of a little mandatory disambiguating white space
that we are willing to pay the price of contorting other syntax
beyond the bounds of sanity? :-)

It's perfectly obvious to me that

        $x = $foo . bar;

"wants" to mean concatenation, and that

        $x = $foo.bar;

doesn't.

Well, that's this inmate's HO anyway.

John.

Reply via email to