Re: [svn:perl6-synopsis] r10077 - doc/trunk/design/syn

2006-07-12 Thread Larry Wall
On Wed, Jul 12, 2006 at 08:40:53AM -0400, Aaron Sherman wrote:
: Smylers wrote:
: >[EMAIL PROTECTED] commits:
: >
: >  
: >>New Revision: 10077
: >>Modified: doc/trunk/design/syn/S02.pod
: 
>>==
: >> 
: >>-foo.bar# foo().bar -- postfix prevents args
: >>+foo.bar# foo().bar -- illegal postfix, must use 
: >>foo().bar
: >> foo .bar   # foo($_.bar)   -- no postfix starts with 
: >> whitespace
: >>
: >
: >I don't think it makes much sense to start the comments with an
: >alternate form for the expressions now denoted as illegal -- "here's
: >some other syntax which this used to be the same as but it no longer is"
: >probably only confuses the casual reader.
: >  
: 
: On a side note, does that apply only to expressions that start with an 
: identifier, or does that mean that:
: 
:$socket.accept.getlines
: 
: will have to be:
: 
:$socket.accept().getlines
: 
: ?

No, this is only list operators, not methods.  So

$socket.accept.getlines

is fine, but

foo.accept.getlines

is not, unless foo is predeclared 0-ary.

But I am tempted to extend it to keywords like "else" and "sub" as
well, because any foo{} confusion is going to train people not to
think about ...{} as a subscript when they should think about it
whenever there's a lack of whitespace.  It would be nice if :foo{}
were the only exception to that.

For similar reasons, I'm also tempted to say that if() is always a
function call, because it looks like one.

Larry


Re: [svn:perl6-synopsis] r10077 - doc/trunk/design/syn

2006-07-12 Thread Aaron Sherman

Smylers wrote:

[EMAIL PROTECTED] commits:

  

New Revision: 10077
Modified: doc/trunk/design/syn/S02.pod
==
 
-foo.bar		# foo().bar	-- postfix prevents args

+foo.bar# foo().bar -- illegal postfix, must use foo().bar
 foo .bar   # foo($_.bar)   -- no postfix starts with whitespace



I don't think it makes much sense to start the comments with an
alternate form for the expressions now denoted as illegal -- "here's
some other syntax which this used to be the same as but it no longer is"
probably only confuses the casual reader.
  


On a side note, does that apply only to expressions that start with an 
identifier, or does that mean that:


   $socket.accept.getlines

will have to be:

   $socket.accept().getlines

?



Re: [svn:perl6-synopsis] r10077 - doc/trunk/design/syn

2006-07-12 Thread Smylers
[EMAIL PROTECTED] commits:

> New Revision: 10077
> Modified: doc/trunk/design/syn/S02.pod
> ==
>  
> -foo.bar  # foo().bar -- postfix prevents args
> +foo.bar  # foo().bar -- illegal postfix, must use foo().bar
>  foo .bar # foo($_.bar)   -- no postfix starts with whitespace

I don't think it makes much sense to start the comments with an
alternate form for the expressions now denoted as illegal -- "here's
some other syntax which this used to be the same as but it no longer is"
probably only confuses the casual reader.

Smylers