Re:Moonshine – A lightweight Lua VM for the browser
by nnq on Tuesday April 01, 2014 @10:29AM
(#7508413)
Got some sample code or a link to it? I really like figuring out ways to express existing code in a different style/pattern/language :)
Re:Moonshine – A lightweight Lua VM for the browser
by Excavator on Tuesday April 01, 2014 @02:00PM
(#7510315)
Map¹ might've been an option, excepting no support in Safari and IE < 11. Although I dunno about the performance hit, if any.
¹ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
You can use objects as keys in Lua. This makes a lot of code in Lua a pain to port to JavaScript. I have Lua code I would like to port to JavaScript that this applies to.