lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



-----Original Message----- 
> From: "steve donovan" <steve.j.donovan@gmail.com> 
> To: "Lua mailing list" <lua-l@lists.lua.org> 
> Date: 01-05-2014 15:31 
> Subject: Re: Ideas about colon operator syntax (and a patch in the work) 
> 
> On Thu, May 1, 2014 at 12:35 PM, Thomas Jericke <tjericke@indel.ch> wrote:
> > Do we really wan't to write polynoms as (2 * x) + (4 * (x ^ 2)) + (3 *
> > (x^3)) instead of 2 * x  +  4 * x^2 + 3 * x^3 ?
> 
> I don't want to - because I'm used to these standard operators and
> their precedence levels.
> 
> Adding another operator that works right-to-left is fine, but I really
> cannot see what this colon operator can do that cannot be done by
> straightforward code,  which we can all read unambiguously.
> 
Actually, if you read my original post again, I said I don't want to have
it right to left. I just wondered if it could make sense, said that I am
unsure about it. But now - thanks to you guys - I am sure it should not be right to left.

Ruling out the right to left order, I may ask again, in case of

print(lower"text":lower())

would you pefer an error (like now) or left to right order assuming that

print("text":lower()) 

is valid syntax.
--
Thomas