lua-users home
lua-l archive

Pari/GP has introduced lightweight anonymous function syntax

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


We haven't opened this can of worms recently :-)
Pari/GP is a language with these features in common with Lua:
 it has several types which at the C level looks like one type,
 it is implemented as a library,
 it comes with its own scripting language.
The basic function definition syntax was not heavy to start with:
 f(a,b,c)=a*(b-c)
but in Pari 2.5 anonymous syntax was introduced:
 f=(a,b,c)->a*(b-c)
I'm not saying Lua should do it this way, I'm just relaying the info.

AltStyle によって変換されたページ (->オリジナル) /