Javascript, the casual language

13 Sep 2017

Have you ever gone from driving a manual transmission car to an automatic transmission car? It’s disconcerting at first. You had more control previously, but now you suddenly don’t. You don’t initially trust the automatic transmission, it can’t possibly know your mind well enough to know how you like the shifting of the gears to occur. But then times goes on and you eventually forget you ever had an issue with this. You can let your mind wander to other things. You’ve lost a bit of control, but did you really even need that extra responsibility anyway? This, more or less, is how I feel about Javascript.

Javascript does so many things for you, it almost feels like I’m being babied or that I have a personal assistant. Everything is close enough to Java so that all of the changes feel like nothing more than the change in dialect one might detect when travelling a couple of states away from your home. It at times felt awkward because I kept trying to find ways to specify things that I didn’t need to specify, like clarifying a datatype when that never seems to be a necessity. I’m certain as time goes on this will become so natural that going back to java or C++ will feel very inconvenient.

However, I already feel that Javascript will have certain drawbacks. When the language assumes things for you, that means that in more complicated programs things might get a bit more jumbled. It’s the drawback of intuitive programming. To intuit is to make assumptions based on common or likely occurrance. The issue arises when coding moves into instances of uncommon and unlikely. Other languages I’ve used were sticklers for specificity. This one isn’t and that worries me. Of course there are ways around this weakness, but then having to find ways around a weakness means you’re doing a little extra work, which eats at the whole benefit of convenience. Going back to my metaphor with the car, someone driving to and from work every day would find automatic gear shifts convenient. A professional racer however, would want the extra control that comes with being in control of a manual car.

Javascript is ultimately a good programming language. Each language has its own strengths and weaknesses. While certain languages come down to preference, Javascript has obvious differences that make it ideal for certain circumstances. I can see why in the fast paced world of web development, Javascript takes to it like a fish in water.

There are a lot of programming languages floating around nowadays, and it’s perhaps an impossible dream to create a single language that is ideal for every programming circumstance. It’s instead preferable to find an area of expertise and, learn the language that fits that circumstance. A language is a tool, and we need the right tool for the right time and place.