r/programming • • May 08 '18

Excel adds JavaScript support

https://dev.office.com/blogs/azure-machine-learning-javascript-custom-functions-and-power-bi-custom-visuals-further-expand-developers-capabilities-with-excel
2.4k Upvotes

585 comments sorted by

View all comments

Show parent comments

5

u/Somepotato May 08 '18

well, false != 0 in Lua, Lua has operator overloads, it's not a detriment to speed to swap metatables (prototypes in JS), etc, so I mean I'd say JS has more grodey quirks than Lua, not to mention speed, and not even to mention that the primary users of Excel will more than likely NOT be previous programmers

not to mention the sheer speed of luajit would be very important in something like Excel.

2

u/tripl3dogdare May 08 '18

I'd just like to point out, since we're at at, that Lua has:

  • 1-indexed arrays with none of the good excuses

  • One of the messiest dictionary/hash systems I've ever seen short of PHP

  • Terrible scoping rules

  • Syntax that can't seem to decide if it wants to be C-style or not

  • A barely-comprehensible class system

  • Among other problems

Whatever technical advantages it may have over JavaScript are in my opinion far outweighed by the user experience - while JavaScript certainly isn't perfect, it at least feels like I'm using a language that knows what it's trying to be even if it fails, rather than a language that can't make up it's mind on anything. To each their own, though - nothing wrong with preferring Lua as long as you know why you prefer it =}

1

u/Somepotato May 08 '18 edited May 08 '18

1 based indexing is again to be easier. The whole 0 based started because c does it. Remember it's not a memory offset, it's an index. Also you can't just say messier hash/terrible scoping without naming any examples, and you claiming the class system is terrible hints at you not having much experience with it to complain about it.

Js most definitely does not make up its mind, why is its truthiness require a printed table? Your examples are really vague so it'd be nice if you at least let me sway your opinion a little bit.

Don't get me wrong Lua has some very weird quirks like ".." vs + and implicit number conversion and no continue statement and more i can't type on mobile I created a fork of to deal with, but js has a lot more imo