4 ms·
Lua makes JS look positively divine.
by notyourday 7y ago
Lua makes JS look positively divine.
- chosenbreed37 7y ago> Lua makes JS look positively divine. Mmm...just had a quick glance at the language reference. Couldn't see anything that would make it inferior to JS. Care to elaborate?
- chatmasta 7y agoThe anemic ecosystem, for one.
- notyourday 7y agoWho needs array length?! That's like, dirty. Write your own by iterating via all elements! What do you mean you want to be able to get, like, keys of your object?! No one needs that! Write your own by iterating through the elements! It's a name of a variable! Unless it is an identifier of a field. But we write it the same way. Here we even provide you a doc of this being a "got ya!" We documented it, so it is cool. Don't even get me started on error stack using pcall() nonsense. And if you really want to have a good time try figuring out how local variables scope interacts with each other... or with a goto. I can go on and on and on.
- SahAssar 7y agoLua is basically the same as JS in this department: A few bad decisions spoils the whole for some people. If you compare lua to js at the same time period they would seem similar in quality to many programmers up until the js renaissance (starting at it's very first in 1999 with ajax and really took off around the early/mid 2010's). If lua had gotten the same attention as JS got it's not hard to see it going the other way around.
- notyourday 7y agoJS at least got its act together. LUA seems to practice answering "How many Microsoft Engineers does it take to change a lightbulb" question with the "None. Microsoft document darkness as the industry standard" https://www.lua.org/pil/19.1.html https://www.lua.org/pil/19.1.html
- SahAssar 7y agoI'm not sure if JS is much better for example: const a = [] const b = '' const c = {} c[a] = 'a' c[b] = 'b' console.log(c[a]) console.log(c[b]) But my point was more that if lua had been given the same amount of development it would probably have turned out as good, It hasn't, so comparing current day-lua with current day-js does not really work.