5 ms·
Would using a macro system such as http://metalua.luaforge.net/metalua-manual.html http://metalua.luaforge.net/metalua-manual.html be another way of doing this
by srean 11y ago
Would using a macro system such as http://metalua.luaforge.net/metalua-manual.html http://metalua.luaforge.net/metalua-manual.html be another way of doing this ?
This blog post reminded me of Lua's rather non-conformist older cousin Tcl. Shaping your own control structure is an idiomatic thing to do in Tcl thanks (or perhaps, but no thanks) to uplevel and upvar. I wish there was a standard goto (no pun intended) place exclusively reserved for creative hacks using those two. There probably is such a page on Tclers wiki, if not it very well deserves to be there.
- vardump 11y agoI don't think metalua is compatible with LuaJIT. Or has this changed?
- srean 11y agoYou are correct it emits Lua bytecode and not LuaJIT bytecode. Wasn't there a refactoring of metalua in progress to facilitate porting ? It would be tedious work but there should not be any fundamental blockers.