54 points · by bpierre · 13y ago · 41 comments
> If you're not competent enough to learn another language then are you competent to write good enough JS?
I used to say that about Java Developers that didn't know C/C++. As I've grown, the thing I've realized is that the end user/customer/client doesn't care what you write your application in (Unless you're on a Government contract). They care if it works.
1) Node.js has a huge ecosystem and it's easy to use
2) JavaScript is known by many
3) JavaScript may not even come close to being a proper language for hardware programming but it is good enough for these kind of devices
So do many other platforms.
> JavaScript is known by many
So are many other languages.
> JavaScript [...] is good enough for these kind of devices
So are many other languages.
The question, as I got it, was "why JavaScript is chosen among many possibly alternatives?". Your comment does not answer it, I believe.
To be more clear, AFAIK, no other platform accomplishes those three goals as good as JavaScript. Maybe Python? GitHub language stats used to say otherwise (until they removed them). I also have the impression that as far as dynamically typed languages go, JavaScript is one of the most optimized ones. Well, Lua and some others beat it on speed but they are not as popular and/or provide what node.js provides.
Which puts it pretty high up to begin with. Factor in the number of libraries that assume an event loop (all of them that care either way) and that are asynchronous by default because of this (most of them) and it becomes pretty hard to beat.
JS-to-Lua might not be well-suited to this sort of platform, since it is so easy to just write Lua instead. But it would be useful if you want to get existing JS code running on new hardware, or if you want your program to be able to run in a web browser as well.
There's also another JavaScript microcontroller crowdfunding at the moment: http://www.kickstarter.com/projects/48651611/espruino-javasc...
I think there's plenty of room for both, and it's exciting to see continued efforts towards making it easier to bridge the gap between embedded devices and the software world!
http://www.kickstarter.com/projects/48651611/espruino-javasc...
and one of these
http://www.kickstarter.com/projects/2021474419/flutter-20-wi...