First a few clarifications…
Ok – yes it’s still a client-side language, but thanks to node.js it runs on the server too. This is kind of a big deal. Look how easy it is to write a web server:
1. Functional Programming
Why oh why did it take me this long to discover the beauty (yes beauty) and simplicity of functional programming? Functional Programming encourages writing stateless programs with immutable data structures – which means significantly fewer bugs and more maintainable code. If you want a more in depth look at the benefits of functional programming check out Why Functional Programming Matters – by John Hughes). Yes that paper was written 25 years ago – and probably more relevant today than when he published it. If you don’t have the time right now to read it – then here’s the TL;DR;
Functional Programming allows for modular code which makes simpler, cleaner, better programs.
2. Prototypal Inheritance
This one sort of dove-tails off of the last point – but it’s important enough to merit it’s very own bullet point. If you’re not familiar with prototypal inheritance you can read this. But the basic point is this: Prototypal Inheritance gives you the benefits of inheritance without the extra baggage (bugs) that you get with classical inheritance.
ubiq·ui·ty: presence everywhere or in many places especially simultaneously
- easy to obtain
- All you need to start developing is a browser. You’ve already got that. Most browsers include pretty fancy developer consoles that include console, debugging, and code inspection features. If you want to get a little more serious – just install node.js which comes with npm (package manager) and the REPL runtime. seriously… cake.
- easy to learn
- easy to debug
Sub-module dependencies are transparently handled by the npm command-line utility which comes bundled with the node installation. The utility also comes with various other commands that allow you install, upgrade, clean, run custom scripts, run test suites, publish, yada, yada…. you get it. It’s all kinds of awesome.
npm install and look at the code – or clone it from the documented repository.
The good news is that Web Browsers are finally starting to play nicely together (Thank you Microsoft Edge! – I’m now looking at you Safari). TC39 (the group that manages the ECMAScript specification) just released the biggest update to the language since its creation. To prove that they are committed to continuous timely updates they named this release ECMAScript 2015. I know – eww. But I can’t argue with the rationale that it holds them to their commitment to release yearly. I can happily put up with a gross version name in turn for keeping the language polished. All the cool kids are still calling it ES6 anyway.
The astute reader may have noticed that I left out the new class construct that was added in es6. I can not in good conscience recommend this tragedy in any shape or form. Again… this is another post entirely – or you can read this.
Ultimately – “Software needs to be better“. On that note, I’ll leave you with these fine words of wisdom: