[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: oo notation
- From: Gavin Wraith <gavin@...>
- Date: Mon, 07 May 2007 14:37:17 +0100
In message <20070507095416.A28281@lua.tecgraf.puc-rio.br> you wrote:
> > Would it be possible, I wonder, to add some sugar that allowed
> > the notation "x = %d\n":format(123)? There is the precedent of
> > letting literal strings lose the parentheses when they are a
> > single argument to a function. I cannot see any ambiguities
> > arising
> Note that
> "x = %d\n":format(123)
> is parsed as
> a=f"x = %d\n":format(123)
> which is probably not what you meant.
Yes, I had thought about the <fn expr> <string literal> <colon> collision.
I suppose that a=f;"x = %d\n":format(123) and a=f("x = %d\n":format(123))
would both be unambiguous.
Gavin Wraith (email@example.com)
Home page: http://www.wra1th.plus.com/