Hacker News new | ask | show | jobs
by devty 3429 days ago
I'm wondering the same thing. What does having a JS syntax bring to embedded programming?
1 comments

Scripting is rarely about syntax. It's about being able to load code dynamically, being able to create ad-hoc data structures, quick changes and distributing executables as source rather than binaries.
None of which are particularly appropriate for embedded programming.
I've adopted a rule where I try to replace a sentence, thought, or expression with, "That's different from how we do things right now," and then try to see if it changes the meaning of what was actually said. Mostly, this is useful when the comment serves to justify shooting down another idea.

"We can't do things that way, because we do things a different way", is something that many people will automatically recognize as a bad argument if you put it that way. (It's in the same bucket as, "Well, nobody has ever complained before.") But anyone—even by accident—can end up using this argument while saying different words. The effect is that it comes in a different package that's more difficult to spot. In the end, though, it's the same invalid discussion killer.

Anyway, that's a lot of exposition. What I came here to say is that your comment is tripping the filter for me right now.

What's inappropriate about a fast development feedback cycle when doing embedded programming?

The answer is nothing is wrong. Some form of shell, stack or scripting language is a super useful tool in the prototyping stages. It might not meet timing requirements for a final system, but at the beginning of a project it's great.
All of these which are very appropriate for a company who wants to sell hobbyist kits to kids who already know JavaScript, so they can built IoT toys quickly.

I understand your point. These tools aren't appropriate for serious embedded systems, but they're also not meant for them. They're meant for people who want to have fun and want to play with things quickly.

Agreed that on-a-whole JS is not appropriate for embedded devices. However allowing scripting may be useful in particular pieces of the code, to allow easy extension / customization.
I recall that very much the same opinions were expressed about the JS and backend programming, until node.js appeared. Now the reality is different.

To be honest, we do not think that JS is a good language for embedded. Like any other existing popular scripting language. Perhaps scripted Go would be a better choice.

The point is that in many, many cases scripting brings a lot of benefits to the embedded environment. It all depends on a specific tasks - for some tasks, scripting will never be appropriate.

I would prefer to see a scripted Go over JS for embedded environments.