3 ms·
JavaScript is built around events and the event loop in a way that few languages are, which makes it well-suited to a hardware environment like this.
by thedufer 13y ago
JavaScript is built around events and the event loop in a way that few languages are, which makes it well-suited to a hardware environment like this.
- vertex-four 13y agoNot really? Javascript interpreters, and the DOM tend to be (and Javascript interpreters only are because they're geared towards being embedded in browsers, primarily). The language isn't any better for it than any other language that supports closures, though.
- thedufer 13y ago> The language isn't any better for it than any other language that supports closures 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.
- cliffbean 13y agoAlso, this is not just a property of the language itself, it's a property of the ecosystem built around the language.