by PhilWright · 10y ago · 0 comments
Is your approach going to significantly improve performance? Doubtful. You really need to prove this.
Is your approach going to make it easier/faster to write code? Definitely not, multithreaded code is many times harder to get right than single threaded code.
Is your approach going to be more robust? Definitely not, deadlocks, race conditions etc. are a nightmare to fix.
Not that it's impossible, but trying to keep certain bits separated is a good thing... I'd love to see proper coroutines/csp in node/js... WebWorkers is similar, but not quite the same, though probably as close as we're likely to see.
Trust me, I tried.
Node is mostly for request/response scenarios such as a web server or REST API server etc.
If you're trying to push Javascript to its limits and make it comparable to C++, good for you. Just remember that JS has many flaws.If you're going down that road I'd much prefer you give the world a Turbo javascript that comes with an IDE like Turbo C and the requisite documentation that all fit on a single 1.44MB disk and which can compile to directly executable code that doesn't need any runtime.