lua-users home
lua-l archive

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


On Thu, Jul 16, 2015 at 4:00 PM, Tim Caswell <tim@creationix.com> wrote:
> This is one of those areas where languages without infix notation, but
> variable-length arguments (like lisp) smile.  You can just do (< x y z) and
> it will do what you expect or (< (<x y) z) to simulate the lua behaviour.
>
> But then you have to give up infix notation and/or have crazy conventions
> like {x < y < z} means to transform to (< x y z) if curly braces are used
> and every odd symbol is the same.

It's also possible to do it at the grammar level, defining the
comparison operators as being optionally ternary.

/s/ Adam