Skip to content

Comment on Tessel: A microcontroller that runs JavaScriptparent

Comments

nothing in Javascript fundamentally forces IO libraries to be asynchronous, it's just that the domain in which JS is used (Node or Browsers) tend to have a lot of async IO due to networks.

nothing in Javascript fundamentally forces IO libraries to be asynchronous

Javascript inherently relies on highly non-deterministic heap allocation, deallocation, and garbage collection. None of these are conducive to real-time IO. You can not make strong guarantees about javascript execution time.

They probably partially get around this by having all the important IO stuff done in C, but then that's not really a javascript microcontroller, is it?

It's not clear to me exactly how it came about that javascript is asynchronous. My suspicion is that in the earliest days, javascript was single-threaded simply because that made the implementation simpler.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.