Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



> 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.


But 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".


> 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


> 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?


Yes, as far as there is a standard and no




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

Search: