lua-users home
lua-l archive

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


On Mon, 22 Nov 2010, Gavin Wraith wrote:
>

I think this is drifting off the topic, since we have been discussing
an abbreviated lambda syntax - there's no discussion about function
application syntax.

> What we are seeing here are the ripples from the clash, in the early
> 1920s, between traditional mathematical notation [ f(x,y,...) ] and
> that of the new logicians, Schoenfinkel, Curry et al, [f x y ... ]
> whom the mathematical community tended to cold-shoulder till well
> after the coming of computers, Lisp, etc. I love Haskell notation,
> myself, but I can well understand that is not to the taste of others.
> It comes down to whether the application operator should be distfix or
> invisible.

There's also the importance of partial application and currying.
Haskell-style application syntax isn't very useful if the syntax for
defining curried functions is klunky - as is the case in Lua.

Having said that, one can argue that the difference between distfix
and invisible application operators isn't actually a difference in the
operator but in which arguments it can take on the right-hand-side.

In most languages in the Algol tradition, the right hand argument can only
be a tuple, and tuples are not first class.

Lua is a bit closer to functional syntax, since the argument can also be a
string or table literal.

Proper functional syntax also allows a number or bare variable name as the
right hand argument, and it makes tuples first class.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
HUMBER THAMES DOVER WIGHT PORTLAND: NORTH BACKING WEST OR NORTHWEST, 5 TO 7,
DECREASING 4 OR 5, OCCASIONALLY 6 LATER IN HUMBER AND THAMES. MODERATE OR
ROUGH. RAIN THEN FAIR. GOOD.