4 ways JavaScript is just better
Every programmer has that language that charmed them, JS is mine
Back in school, I learned programming using both C++ and Java, both kind of rigid and verbose languages. Great at what they were built for (the main reason why both of them are still around and still strong) but certainly not built for everyone.
JavaScript, on the other hand, is an extremely flexible language with a very warm community, so, in this article I want to share my love for JS with everyone and maybe charm a couple of people that maybe choosing a new language to learn or just haven’t checkout JS yet.
Community
The community surrounding a language is probably one of the most important things in the long term, it is crucial for the language to stay alive and evolving and is the main way that newcomers come to learn and embrace it. Also the bigger the community, the easier will be for you to find help for any problems you find along the way.
That being said, JavaScript has, without a doubt, one of the biggest communities out there. It’s so big that there’s a running joke about how there’s a JS library being born every minute. There’s even a drinking game involving JS libraries in NPM.
JavaScript is so big that, if there’s a software community near you, it is probably a JavaScript focused one. So, embracing it could open up a brand new world of people and networks to explore.
Relevance
The main reason why JavaScript is here to stay is that it’s absolutely fundamental in today’s web development scene. It is the main tool used in frontend development and because of that I don’t think any of us will see the end of JavaScript in the short term.
So, if you’re learning JS, the most probable thing is that you’ll find projects you’re interested in and won’t be out of a job any time soon. And, besides that, JavaScript has not stopped with the frontend part of software development, and that is a big point that deserves a mention of itself.
Applicability
Not only can you use JavaScript in the client-side of the web, you could use it also in the backend side of things using tools like Node.JS (as I’m doing right now!). That trend is gaining a lot of steam to unify the whole web development process into one single language.
But not only on the web can you use JavaScript. Remember all those libraries and the whole running joke about there being too many of them? Well, jokes on them because many of those are used to develop software for other platforms.
For example, React Native is being used to develop mobile apps for both iOS and android devices. Electron is used to develop desktop apps with HTML, CSS and JS. Even things like Machine Learning with TensorFlow.js, game engines and IoT applications are being made, you know, the sky is the limit.
Flexibility
Now, even though all of those things are amazing about the language, think about this, we haven’t even thought about JavaScript itself, which I may talk about more in depth in a different article.
But, when we come to syntaxis, JavaScript has one of the most pleasant to read, over the years it has evolved to welcome new trends like functional programming, which simplify a lot of the code you write. Also helping you write JavaScript in many different styles, from OOP to functional.
And, if we’re talking about flexibility, here comes the biggest double-edged sword and a big point of debate for many programmers, that is static vs dynamic typing. In a nutshell, JavaScript (as well as other popular languages like Python) allow you to store whatever you want in their variables, from strings to integers to objects, without you declaring what will you store in them. This leads to extremely flexible and quick to write code since you don’t have to worry about types.
That being said, dynamic typing is a problem for many people, hence TypeScript, you see JS is so great that there’s even a solution for those kind of people. TypeScript is a superset of JavaScript, which means it’s JS plus a bit more (that bit more includes static typing for those who are into that kind of things).
Final Thoughts
JavaScript is here to stay, and since it is, you should give it a try. JavaScript can be great for things like side projects because there are so much great tools to use and explore and it’s so easy and fast to develop solutions for any problem you have using JavaScript that at last as a personal tool I strongly recommend learning it.