lua-users home
lua-l archive

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

> So that would cover only something like a+b*c+1.5, provided _all_
> of the variables are passed as arguments. Even a single use of an
> upvalue defined outside the function would foil that approach,
> because of the need for type checks (which can fail).

Exactly this is what I meant, ugh.. maybe I'd expect we can define something little bit advanced, maybe use some loops and local variables as well.

> I don't think that's a generally useful subset of the language for
> this kind of problem.

Indeed this is pretty limited subset, but if we allow math functions too and FFI calls, then we are able to define pretty many useful expressions that can turn into callbacks. The only constraint would be to not use upvalues.

Adam Strzelecki