lua-users home
lua-l archive

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


On 11/26/2010 12:54 PM, phlnc8 wrote:
How about
    [ x : x>  3 ]
    [ x, y : x+y, compute_something_else(x,y) ]

If the form is to be limited to an expression, I think LHF's syntax is the best I've seen so far - even with the '\' being in two different places on two keyboards in my house!

  \x,y,z(x*y+z)    --> function(x,y,z) return x*y+z end

It's concise and seems to have the fewest (zero?) ambiguities.

Doug