for M2M application which is better among Javascript and Lua?
everyone talks about LUA when it comes to M2M applications.i am aware of javascript very much.
so is it worth learning Lua and later implemnting to M2M applications instead of javascript?
for M2M application which is better among Javascript and Lua? everyone talks about LUA
Share
Javascript’s advantage in M2M is that it does serialization and deserialization automatically with JSON. Although Javascript has some foibles, JSON is useful enough that it’s widely used, even where Javascript is not.
Javascript’s other advantage is that it’s supported on anything that has a browser, so all desktops and smartphones, and has lots of features like TCP and UI.
Lua is in general a better language, and its VM is much smaller, so it can fit on embedded systems with less storage and memory, and there is a version called eLua which is even smaller. But one reason it’s small is that it does not have much external functionality: you’d have to add serialization, TCP and UI yourself, or find libraries that suit. You might have to make more effort to port to some platforms, as I once did for Android, for example, where Javascript would have been easier.