lua-users home
lua-l archive

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

On Sat, Nov 27, 2010 at 10:55 AM, Paul Hudson <> wrote:
> a common higher order function that is just for its side-effects. Of course,
> the function could always return a value that's ignored.

Which is the Lua way ...

Trying to do too much with short forms will cause confusion. We can do
a lot with a simple expression.

(The problem that statements-are-not-expressions is something else and
interesting in its own right, e.g. return if a > b then 10 else 20
end.  If you think that's not part of the Lua tradition, remember that
Algol 68 worked like this)

Here's an interesting take on the problem from a slightly different
angle, well worth reading carefully:

steve d.