30.10.2018, 15:13
You've probably confused threads, but ok
I very like JS. This is very modern, fast(fast among script languages) and expressive language with a lot of staff which Lua doesn't have.
I mean:
nice, fast, chainable array methods, and a few characters shortcuts (arrow functions)
Maybe this is stupid example but I like this array methods in JS and also that array are passed by reference.
Creating objects is also very easy (also without classes).
Another advantage of JS is its community and thousands of libraries.
But unfortunately LuaJIT is faster so JS could be(but now it is not possible) only used via NODEJS only as a support for this main technology on server.
But on client you have now JS and you can use it. And when you generate something via .lp file you can via Lua prepare raw data and in JS do most of work.
But also without JS on server I will like LM because this is very, very nice device for creating powerful logic in a lot of powerful ways
I very like JS. This is very modern, fast(fast among script languages) and expressive language with a lot of staff which Lua doesn't have.
I mean:
nice, fast, chainable array methods, and a few characters shortcuts (arrow functions)
Code:
// Javascript
const users = [{id: 1, balance: 100}, {id: 2, balance: 30}, {id: 3, balance: 80}]
users.find(u => u.id == 2).balance += 20;
-- Lua
users = {{id = 1, balance = 100}, {id = 2, balance = 30}, {id = 3, balance = 80}}
for i,u in ipairs(users) do
if u.id == 2 then users[i].balance = users[i].balance + 20 end
end
Maybe this is stupid example but I like this array methods in JS and also that array are passed by reference.
Creating objects is also very easy (also without classes).
Another advantage of JS is its community and thousands of libraries.
But unfortunately LuaJIT is faster so JS could be(but now it is not possible) only used via NODEJS only as a support for this main technology on server.
But on client you have now JS and you can use it. And when you generate something via .lp file you can via Lua prepare raw data and in JS do most of work.
But also without JS on server I will like LM because this is very, very nice device for creating powerful logic in a lot of powerful ways
Done is better than perfect