This is why the presentation keeps talking about web developers. There are more web developers than there are any other kind of programmer. If you want to make your programming platform accessible, make it accessible to web developers.
Is there any data to back this up? I would think Java or VB or C++ programmers far outnumber web developers.
ftfy.
I'd be more interested in what embedded JavaScript would allow to be done that other existing tools can't currently do. After all, if you're a JavaScript person and you needed to do something on a device or platform, you wouldn't wait for a language runtime to become available, you'd just go learn the existing language/tools and build it?
It's not hard.
But given a choice between Platform A which says "write in a language that all of you already know", and Platform B which says "write in this language most of you don't already know and would have to put in time and effort to learn before you could do anything useful with this platform"... which one would you bet on?
Unless I'm really rushed and have 2 days to do a vast amount of work.
That being said, the community is small and there are indeed way too few libraries available in LuaRocks (slightly over 300). We have been discussing that on the language's mailing list and I will probably talk about it at the upcoming Lua Workshop (http://www.lua.org/wshop13.html).
x = 5; // global
var x = 5; // local
Lua just replaces var with local: x = 5 -- global
local x = 5 -- local- local by default weakens what you can do with the scope;
- we want something by default because the language is used for things like configuration files.
The 2nd point means this must be valid:
param_1 = "foo"
param_2 = "bar"
I would personally be happy to sacrifice that feature and add an explicit "global" keyword but not everybody agrees, and it would break a lot of code.What we do instead is use two kinds of tools: static global detectors and strictures (like in Perl). Similar tools are integrated in IDEs as well.
With these tools, I have never had an issue with scoping in code I have written. But it takes a little time to get used to it.
For sure. That ship has probably sailed. And, like you said, linters alleviate a lot of that pain. But that's a separate question from, "is this a good language feature?"