Hacker News new | past | comments | ask | show | jobs | submit login

Sure if you write very low level stuff, C is probably more suitable. I wonder how much today's "embedded devices" still have in common with traditional embedded devices, though? If it is capable of running JavaScript, it probably is a lot more powerful than some microprocessor with just 2KB RAM where you have to squeeze every bit out of your code. On the PI you can run a complete Linux installation. I don't think these devices are actually embedded, they are just smaller than "normal" computers.



JavaScript, and scripting languages in general (and, to be more specific, dynamically typed languages, too, but those tend to be scripting languages, anyways) tend to have a lot of gotchas, and when it comes to controlling physical things, I think that less gotchas are better.

Yes, statically typed languages just put a bunch of metadata in the code, but I think it's useful to have the guarantees provided by a static type system when your controlling things.

Like if you're controlling a robot arm. I'd rather have the type system make sure I don't try to do something stupid, like add a string to an int that's controlling the degree of the arm. Static languages make sure you can't do that, most dynamic language will let you do that.


It would definitely depend on the kind of project (for me at least). I probably wouldn't recommend writing the controller for some medical device in JavaScript. My impression was that devices like the one here are more for tinker projects, making LEDs blink and stuff like that.

Although I also don't agree that statical typing makes things so much more safe. And what can also happen is that in the world of statically typed languages bad workarounds are then invented for the inflexibility. An example would be the XML craziness that plagued the Java world for a long time.


Then just write more unit tests and you'll be fine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: