5 ms·
It's not deceptive if you have a preemptively multitasking runtime that you trust (like the Erlang VM); it's a much more natural way of writing code. Single-thr
by metabrew 16y ago
It's not deceptive if you have a preemptively multitasking runtime that you trust (like the Erlang VM); it's a much more natural way of writing code. Single-threaded, event-driven callback spaghetti makes code harder to read, and inherently means more code.
If someone took v8, added lightweight coroutines, and wrote a preemptive scheduler for it, I bet you could massively reduce the SLOC count for large node.js apps.
- sovande 16y ago> It's not deceptive if you have a preemptively multitasking runtime that you trust That may be so, but since Javascript is inherently single threaded _and_ this is about javascript I agree with Cushman that it is indeed deceptive.
- jerf 16y agoBut we aren't talking about Javascript. It's about a theoretical replacement language. Also, the reason you care about the "synchronicity" in the first place is because your environment forces you to care! When it all Just Works (TM), you don't care whether it's "synchronous" or not. That's a deficiency in your language, not a feature. I'm not theorizing. I program in this sort of language all the time. You worry much more simply about how long something will take, which you can never not worry about, rather than how many bits are "synchronous".
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- sovande 16y ago> But we aren't talking about Javascript. It's about a theoretical replacement language. Apparently the plan is to implement this "theoretical replacement language" in javascript using node.js https://github.com/fogus/funode/blob/master/src/funode.js https://github.com/fogus/funode/blob/master/src/funode.js
- awj 16y ago> That may be so, but since Javascript is inherently single threaded Is that in the language standard, or are you confusing details of implementations for the language's design?
- deleted 16y ago[deleted]
- sovande 16y agoYes, as far as there is a standard and no