2 ms·
Node.JS's future is intricately tied to JavaScript the language itself and IMO we are still in the early days of Node.JS. The success of a language isn't about
by jeswin 11y ago
Node.JS's future is intricately tied to JavaScript the language itself and IMO we are still in the early days of Node.JS. The success of a language isn't about excelling individually at expressiveness, type-safety, widespread distribution, performance, tooling or ease-of-use; but about finding that sweet spot. JS is that compromise.
I'll just list the strengths of Node and JS in general, in no particular order:
- JavaScript was called "Java"Script for marketing. But the funny thing is that it has become the true "Write Once, Run Anywhere" alternative to Java. Including phones without installing additional software. And projects like React Native will take JS outside the browser into native apps.
- JS has a monopoly in the browser. To build any web-app, you/team need to know JavaScript anyway. Having to use only one language is an advantage for many companies. For larger IT companies, this also dramatically cuts down their training expenses.
- Very active community, perhaps the most active of any language ecosystem. What's remarkable is that the key people in standards and implementation bodies aren't operating on mailing lists alone, but work closely with product teams in their own companies and interact with the rest of the (very large) community through forums and social media. This has resulted in excellent prioritization of features and an active feedback loop. Also, peaking at a time when collaborating coding (GitHub) matured helped. (1)
- NPM and Packages. There's a package for everything. We often hear people complaining about hundreds of npm packages downloaded per install. That's also the strength of NPM. Packages range from monolithic to tiny 20-line functions. The fine grained granularity of packages makes it a simple, anytime-revocable decision.
- JS is a very expressive language like most dynamic languages are, but the years of performance wars by browser vendors have given it a significant lead.
- Tooling is excellent. There even plenty of academic-style research going on, like FaceBook's Flow.
- You could compile other languages down to JS. You can compile Doom to JS and play it inside a browser. (However, JS will retain that native-support advantage.)
- ECMAScript 2015 fixes the big issues with JS. We can treat it like an entirely new language, and in time we can forget the good parts/bad parts discussion.
- JS isn't trying to shoehorn performance into its expressive style. If you're using JS for performance critical work, you will be forced to use data-structures specifically designed for performance. If you need to operate at native-code levels of performance, you'd have to write code differently from the usual expressive and dynamic style. That's a fine compromise, it doesn't have to tread over the neither-here-nor-there territory. Also, pragmatic parallelism is coming (https://blog.mozilla.org/javascript/2015/02/26/the-path-to-parallel-javascript/ https://blog.mozilla.org/javascript/2015/02/26/the-path-to-p...).
And perhaps the most important one: Wikipedia took off because it made collaboratively editing documents easy and doable with just the browser. If it required downloading and installing additional tools, it may have never achieved the same success. Now, the future will have more people who know programming than ever before. Like writing articles, they might build apps together. The true USP of JS isn't that it runs everywhere, but that browser vendors have shipped billions of debuggers.
(1) Not saying other languages don't have vibrant, active communities.