lua-users home
lua-l archive

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


On Thu, May 20, 2010 at 5:06 PM, Romulo <romuloab@gmail.com> wrote:
>> That is cute.  The basic problem is how to 'quote' an operation so
>> that it can be executed later.
>
> I don't understand what this "quote an operation" problem is.

Maybe the terminology is strange, since I probably first saw the
concept of quoting in my Lisp days.  There is an expression which we
don't wish to evaluate, so we 'quote' it and evaluate  it later, in a
lazy fashion. In Lua, x+1 can be quoted as 'x+1' or function() return
x+1 end, etc (there are a number of ways)

Your approach solves the problem neatly by making the post-assert
phase do all the hard work, which is appropriate.