4 ms·
No toes trodden on! Advantages of node.js as I see them: - Provides npm (a state-of-the-art package manager which introduced a number of innovations) - Built
by ak217 13y ago
No toes trodden on!
Advantages of node.js as I see them:
- Provides npm (a state-of-the-art package manager which introduced a number of innovations)
- Built on V8, which is possibly the best dynamic language compiler made to date, in terms of performance
- Provides a well-done streaming I/O and event model, which many languages fail at
- Provides an extremely powerful and high performance async/concurrency model, which is set to improve as promises and other concurrency patterns mature
- Has a well-tested, high-performance, properly layered standard library (most of the time)
- Has a nice C++ extension framework
- Has a very active (though sometimes rough around the edges) developer community
The downsides are:
- It's Javascript, which has some serious design issues as a language
- Currently still suffers from callback spaghetti, which is set to improve as per point 4 above
- Can be very hard to debug in the face of its async model because of insufficient built-in debug facilities
- zackbloom 13y agoI have to disagree with the Javascript design issues. I've used both Python and Javascript for years, and the more I use Javascript the more I realize how ad hoc Python really is. So many of it's features (metaclasses, raising an exception to break iteration, the MRO, the import behavior, etc.) seem to be hacky solutions to problems of it's own making. Javascript is a much smaller, and therefore simpler language.
- ak217 13y agoTo each their own. I really dislike Javascript, and while Python is not perfect, at least it has the right set of core values and a community process that results in tangible improvement. I mean, you're complaining about the finer points of Python OOP - to me, Javascript OOP is broken, and there is no community standard to fix it. What's wrong with raising exceptions to break iteration or with the import behavior?
- est 13y ago> raising an exception to break iteration You don't have to. def mygen(): yield 1 yield 2 return print "never been here" >>> list(mygen()) [1, 2] I agree some parts of python are hackish though. Maybe because of legacy reasons. And py3k didn't fix all of them
- girvo 13y agoSilly question: while I love promises as a way of avoiding callback hell when dealing with an all-async-all-the-time language and standard library, does Node give you actual concurrency/parallelism (compare and contrast with Go, or Erlang)? Or is it just the (admittedly still very powerful and useful) async setup that matters? If so, why?