[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Pari/GP has introduced lightweight anonymous function syntax
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 17 Jun 2012 16:44:06 +0200
2012/6/17 Egor Skriptunoff <email@example.com>:
> Does these anonymous functions forced to return some expression as result?
In Pari/GP, the result of the most recent calculation before returning
is automatically the return value. If there was no calculation, 0 is returned.
(In many ways, 0 in Pari/GP does the job of nil in Lua.)
> What about other simple functions?
In Pari/GP, you don't use the parentheses.
That's perfectly legal in Pari/GP. It increments x and returns the
> Assignment is not an expression in Lua.
> Should this definition cause compilation error?
As I said, I'm not suggesting this syntax for Lua â but if
someone does suggest it, I would definitely oppose allowing