On Sun, Mar 06, 2005 at 03:15:23PM -0700, Luke Palmer wrote:
: But this allows the syntax '$x.foo $y', that is, an argument to a method
: call without parentheses.  This isn't a big deal, and could even be
: construed as a feature, if it weren't for:
: 
:     for %hash.keys { ... }
: 
: Which is misparsed.

Which is why recent versions of A12/S12 outlaw arguments to methods
without parens.  Method calls cannot be parsed with the same rules as
functions and list operators, unfortunately.  The original A12 tried
to make that work, at the expense of arcane lookahead rules, but it
just got too bizarre.  Those braces above *have* to know that they're
where an operator is expected.  Since we can omit method parens on
argumentless method calls and on method calls that have only adverbs,
requiring parens only on methods with extra arguments is a fair price
to pay for dropping parens off of the conditional expression, I think.

[A reminder that implementation followups can certainly go here, but
philosophical followups should probably be rerouted to p6l.  A certain
amount of leakage is necessary, of course, and I don't mind answering
short design clarifications here, as long as they don't clutter the
list with the sorts of idle speculations that are more typical on p6l.]

Larry

Reply via email to