Javascript: The bad parts

js JavaScript is a widely used high level programming language.
Due to its numerous benefits which includes it being a client language, its simplicity and popularity, its extended functionalities to web pages, its versatility, its procedural programming abilities, its ease to learn, its relative speed for end users to mention a few, it is very easy to conclude that JavaScript is faultless. Is that entirely so? What are the bad parts to JavaScript if any exists at all? Let's consider some points.

  • Browser support: Sometimes, different browsers interpret JavaScript differently. Although the scripts of the server side always bring about same output, the client side scripts sometimes bring out different outputs which makes it unpredictable to a certain extent. One way that this issue can be curbed is by testing your script with major browsers. Also, some services will help you test your code to update them, enabling them to work by all browsers. Is this not so stressful?
  • Client-side security: In some cases, a user's computer which houses the code is exploited through illegal entry or theft.
  • Language presentation: JavaScript does not have a strict type system. It is a prototype-based language which follows the ECMAScript Standard. It supports imperative, functional programming and object-oriented paradigm. Although its dynamics can be advantageous, it can also be an issue in certain applications.
  • Loose syntax: JavaScript is highly flexible and dynamic and permissive. Due to its flexibility, when errors are made in writing a code, it keeps accepting them; making errors a bit difficult to detect early on. Sometimes, a fast-fail behavior can be very helping in bringing the errors to your attention especially when you are programming without using a compiler, which will save time. JSLint can be very handy in helping you detect possible errors in time, although you have to follow some coding conventions to use it.
  • Poor refractory capabilities: IDE's can inspect strictly typed language systems which enforces a design route, and this provides greater manipulations. For example, Renaming in JavaScript can be very tedious when compared to C# or Java.
  • Implicit Casting: In Array.sort() and some unexpected areas, implicit casting has made using = = unreliable for comparisons.
  • Prototyping: Older JavaScript do not have 'class' keywords making it prototyping a bit time consuming as time is required to understand how it operates. It is not an utterly bad feature, but as everyone need to write their way of emulating JavaScript OOPS, this has given room for different sorts of constructions.

These JavaScript problems are undeniable.
Many users including JavaScript enthusiasts to won't deny it.

Rather they look at the pros and argue that

  • All programming languages have their own faults, so it's not just a JavaScript thing.
  • JavaScript is very easy to use and requires just a web browser and text editor to start with.
  • JavaScript allows functional programming.
  • JavaScript is available on multiple platforms, from machine learning to mobile phones, games, desktops etc.

These are reasonable points but does not remove the fact that these glitches exist which can be bad to some users.
In spite of all these glitches, there is good news.
JavaScript is widely applied, and there are numerous tools and ways by which the above-mentioned problems can be tackled. Sometimes these processes can be time consuming and annoying.
Still, JavaScript remains highly effective.



Boostlog is an online community for developers
who want to share ideas and grow each other.

Delete an article

Deleted articles are gone forever. Are you sure?