Basically, your processor is fast. This is insanely fast.
Your memory is crazy too.
Your hard drive is not crazy fast.
Internet is terribly slow (REST, RPC, etc.).
node.js aims for you to constantly load your processor by doing slow events. That is, instead of
var html = download_file_from_slow_internet(url);
would you do something like
download_file_from_slow_internet_with_an_awesome_callback(url, function(html) { });
Pro-something-something is most likely related to the CPU in terms of what you want to do. Anyone who made the download_file_from_slow_internet_with_an_awesome_callback function has a burden to make sure that it calls your callback at one time.
In your example, an infinite loop is a pure processor. With node.js, it will stop the whole server, which is very bad. So do not write endless loops.
Keep in mind that “less than expert programmer” is relative. An expert programmer knows and understands threads, blocking, conditions, mutex, race conditions. If you do not use multiple threads, you avoid all problems. Well, why were the topics introduced first?
They were introduced in this way because the processors became viciously fast and people noticed that it makes no sense to wait for the IO. That is, you can simultaneously upload your data and process it. Of course, this caused a lot of problems. Most socket libraries have introduced non-blocking IOs to solve this problem for networks, but this has introduced a fundamentally different approach to programming.
You had to use state cars, and state cars were unpleasant and extremely wrong in the hands of lay people. If you've ever worked with low-level socket state systems in C, you know what I'm talking about.
Here node.js comes on a white horse. When using node.js, the state machine is implicitly using closures for callbacks. It is also called continuing transmission.
The idea is that I talk about it and then pass in a function that says: "When you're done, call it." Because JavaScript supports closure, you can pass state and build a state machine implicitly using the language.
node.js, as it stands now, is a great platform for building custom servers and building robust web applications. A good place to create a service between PHP or Ruby and C.
I recommend using it for server prototypes, and if you are worried about JavaScript performance, you can help me with node.ocaml which is far from complete, but makes node.js slow.