On Thu, Apr 06, 2006 at 10:18:48PM +0800, Audrey Tang wrote:
: TSa wrote:
: > Note that a prominent, typical foo actually reads:
: > 
: >   self .bar;
: > 
: > And a self($_.bar) is pretty much useless. In other words
: > wrongly huffmanized.
: 
: FWIW, I agree with both points.  Some more points:
: 
: * I think both "say(.meth)" or ".meth.say" are more succinct/readable
: than "say .meth"  for "say($_.meth)".
: * "say() .meth" is a parsefail according to the new rules, but can be
: quite useful to align things up.
: 
: I committed r8573 only because of r8563 changed the dot/whitespace
: interaction, which caused inconsistencies in other parts of the
: example... The old interaction rules imho is quite easier to explain.

Okay, we could revert it, and .foo would remain term/operator sensitive,
and retroactively eat preceding whitespace when an operator is expected.
Just so you realize that it will make missing operators errors harder
to notice, particularly missing semicolon or comma.  There have to be
some spots in the grammar that enforce synchronization by being syntax
errors, or we really will end up with a language that can parse line noise.

Another option would be to duplicate the . on both ends of the whitespace
when you want a delayed postfix:

    say.
    .foo.
    .[32];

Somebody please point out all the downsides to this approach.  But you're
only allowed to count "I'm not used to it yet" once.  :-)

Larry

Reply via email to