Hacker News new | ask | show | jobs
by pansa2 2332 days ago
Thanks. I wonder if this would be any different if the VM executed MoonScript code directly, rather than first requiring translation to Lua.

I’ve been thinking about the syntax of an embeddable language myself, and have ruled out significant indentation because of the difficulty of writing such code inline inside C files. If that’s not a common use case, maybe I should reconsider...

1 comments

There is no MoonScript VM, if you use the "execute moonscript" function provided by the moonscript library it internally compiles the moon code to lua, loads the lua code, then runs the lua code.

This means that MoonScript compiled ahead of time will have the same exact result as running it on the fly.