lua-users home
lua-l archive

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

On 04/18/2015 02:45 PM, Hisham wrote:
I would doubt that using varargs as a Forth stack is the best approach.
What’s wrong with a Lua array (aka table)?

Lua arrays can't do nil, Lua stacks can.

If you're already writing a VM to a different language, you can just
map your Forth's nil to a non-nil Lua singleton.

I'm on the same camp: null-like values that have a meaning in your business logic are not Lua nil. Nil is a language thing, not "something". If your applications has a value that can be stored and is guaranteed to exist only once then is a singleton, something like

NULL = {}  --accesible globally