The Future of JavaScript 2024

JavaScript is one of the most popular programming languages in use today. But what of the future? Will JavaScript be replaced by a new language?

29-08-2024
Bcorp Logo


Here's an update to what it's fair to call our annual look at the future of JavaScript - previous gazes into the crystal ball happened at the start of each year, but we thought we'd wait a while in order to encapsulate the latest ECMAScript Update in June this year - ES2024.

Why such a focus on JavaScript you may ask? Well, JavaScript is the most widely used language of them all, no matter which survey, index or website you look at; JavaScript will be in the top three for popularity among developers, deployments and job prospects. It is often the number one language on those indexes – suggesting it is the most important language to be aware of (even if you don't work with it directly yourself). It highlights trends and patterns, and it is continually evolving.

However, just because a language is popular right now does not mean it is the best language or that it will remain popular in the future. If you were to go back, say, 10 years you would find Java was the number one language on most of those indexes and surveys, whereas it is often third, fourth or even fifth today.

JavaScript's Popularity

In years past, we said “it doesn't matter which tech survey or index you look at; JavaScript is always near the top of the list.” …this certainly has not changed in 2024!

For example, the PYPL (PopularitY of Programming Languages) index placed JavaScript third (behind only Python and Java) in both February 2022 and in Feb 2023 and it is still third in 2024. Although compared with 2023 the 1 year trend is slightly down on 2023 (by -0.8%). Do bear in mind that this is a language which was first released in late 1995 and is still one of the key engines of our technological world in 2024!

Similarly Stack Overflows’ list of most popular technologies in 2021 placed JavaScript top with nearly 65% of respondents using JavaScript. In 2022 and 2023 (Stack Overflow 2023 survey) it remained top with just over 65% usage in 2023. For 2024 perhaps unsurprisingly it remains top with a slight drop to 62.3% for all respondents but 64.6% for Professional Developers. Interestingly that is over 10% higher than the next language SQL in the survey

This is now 11 years in a row that JavaScript has come top! If you consider only those learning to program, it is a very close three-way tie between HTML/CSS (which this author does not consider a programming language but rather a markup language), JavaScript and Python. However, just over 60% of respondents are still using JavaScript to learn to program.

What's more, TIOBE index for 2022 and 2023 (which considers a wide range of factors such as searches, courses, 3rd party vendors, developers etc.) placed JavaScript 7th in both years. In 2024 the TIOBE Index for 2024 now has JavaScript moving up one place to 6th with about a 0.7% increase in activity.

So although there hasn’t been a massive increase in interest or usage in JavaScript across the last 12 months, JavaScript has either remained stable or has seen a small amount of growth indicating the stability of JavaScript at the top of the charts!

Last year we asked the question:

“But what of the future? Will JavaScript be replaced by a new language? Will it evolve unrecognisably? Will it continue to dominate?”

So has anything changed / happened in the last 12 months to change our opinion? We will look at the points we made last year and consider the Frameworks and libraries to watch in 2024.

Modern Javascript training course at Framework Training

Present Day

Last year we identified several present-day trends and considered their effect on JavaScript. This year we will see what has changed.

Ubiquitous Availability

There was a time when JavaScript could justifiably be considered a browser only front-end language. However, today, JavaScript is available on nearly every platform and can not only be used for browser-based UI applications, but also for back-end services (via Node.js, Deno or Bun, the first two both originally created by Ryan Dahl), for mobile applications (for example using React Native or NativeScript), on the desktop (via Electron) and with hybrid applications (using Ionic). JavaScript is literally everywhere today!

This ubiquitous availability makes for a very useful tool for developers and promotes its utility to organisations...and that doesn't look set to change any time soon.

One interesting aspect is the combination of RUST on the backend with JavaScript on the front end of a web-based application. This seems to be an increasingly common pattern and one which is worth keeping an eye on.

Developer Community

The developer community for JavaScript is still huge. This means that not only is there a large amount of skill out there, but also if an organisation needs to recruit new JavaScript developers, they will be able to do so and at a reasonable cost. This is important, as choosing to use a language for which there are scarce and / or expensive resources available will cause problems somewhere down the line.

Ecosystem

This is also still a huge ecosystem of JavaScript libraries available - these libraries cover everything from front-end frameworks to performance enhancements, to programming language extensions. This means that rather than starting from scratch, developers can employ (often very well-maintained) libraries rather than re-invent the wheel, saving time and money. This ecosystem is not about to disappear, and any new language would take significant amount of time to generate similar levels of support.

Standard Keeps Evolving

The standard used to specify what is in a particular version of JavaScript is essentially defined by the ECMA (European Computer Manufacturers Association) as ECMAScript (technically speaking ECMAScript does not include a few things that any JavaScript implementation will provide such as the DOM API). This is often shortened to ES as in ES6 (ECMAScript 2015 6th Edition). Thus, a particular JavaScript runtime, such as Google's V8 engine, or browser such as Firefox, will be said to be "ES6 compliant."

The current version of ECMAScript at the time of writing is ECMA-262 or ECMAScript 2024 the 15th edition of the specification aka ES15 (released in June 2024). This version updated or added several new features. For example, it has revised the way in which Promises are created to bring them in line with other JavaScript APIs. This version has also introduced the ability to categorize objects into categories using Array grouping – something that is common in many other languages and which JavaScript developers used to have to import Loadash for. Another feature that helps the usability of the language is the use of the /v flag in regular expressions to improve the handling of Unicode characters – the basic feature was added in ECMA2015 but there were some oddities and missing features to that version – this is an upgrade and effectively a replacement for the older version 9which is still available via the /u flag). Other improvements relate to asynchronous code and easier WebAssembly integration.

Interestingly, "JavaScript" is a trademark of the Oracle Corporation as it was originally trademarked by Netscape, who collaborated with Sun Microsystems, who then acquired the trademark before Oracle acquired Sun!

Compile-to-JavaScript (transpiling)

One trend over the last decade has been the development of compile-to-JavaScript or transpilers.

A Transpiler is a source-to-source compilation which translates one programming language into another. These transpilers allow another language to be cross compiled into JavaScript so that it can be run on a JavaScript environment such as a browser. The poster child for JavaScript transpilers is TypeScript – essentially a typed version of JavaScript. Other languages that can be transpiled to JavaScript include TypeScript, Kotlin, Scala and Dart. Indeed as of 2024 there are many, many languages that can be transpiled into JavaScript (see a list of the best languages that compile to JavaScript).

This has the potential for JavaScript and its runtimes, such as V8, to become the default cross platform execution environment of tomorrow.

Modern Javascript training course at Framework Training


Longer Term

JavaScript’s’ ubiquitous nature and its adaptability are likely to continue and ensure its prosperity in the longer term. For example, interest in AR, VR and the Metaverse is growing and JavaScript is uniquely suited to take advantage of this.

Indeed, if you do a search on YouTube for JavaScript and Virtual Reality you will find a whole host of tutorials on how to do this. Several are from 2022 but several are newer such as an example of how to create an Immersive Virtual Museum Tour (https://www.youtube.com/watch?v=8oQC0ICNtL0). They often (always?) use additional libraries such as Three.js but that’s the nature of JavaScript – libraries make it more functional for whatever type of system you are creating.

Of course, the language will probably need to evolve and adapt to the new requirements. However, it can do this.

Although the language specification is administered by ECMA, the world of JavaScript frameworks is free to explore whatever avenues it likes. This allows for great flexibility and experimentation. This is already illustrated by the lack of DOM API features in ECMAScript but its presence in all browser based versions of JavaScript!

In addition, ECMA looks at how the language is being used, what libraries are most popular / in demand and takes input from a wide range of interest parties when incorporating new features in the next release. They are therefore not constrained or hampered by any organisations vision (or indeed lack of vision). Thus, it may well be that JavaScript can evolve to provide native support for whatever technology or APIs may be used in a Metaverse future.

Potential Challenges facing JavaScript

Back in February 2022 and 2023 we highlighted the challenges facing JavaScript and these have not really changed, if anything they have solidified.

Some of the challenges facing JavaScript and its potential longevity / success include:

Multi-Feature Language

One problem with absorbing many different ideas or concepts into JavaScript is that a language which was once simple and easy to learn may become bloated, convoluted, and difficult to use. This might result in a significant barrier to entry for new developers and lose the loyalty of its many existing fans. We can already see more and more of the more subtle concepts in Object Oriented Programming from languages such as Java and C# migrating into JavaScript (for example in ES13).

Technology Moves too Fast

Although ECMA release a new specification every year, the language developments since ES6 in 2015 have been relatively small. It is possible that new concepts / technologies may bypass JavaScript, leaving it in a JavaScript cul-de-sac. That is, it might become a legacy language, with a significant body of work behind it, but with few new or exciting projects being developed in it (think COBOL as an example here).

Modern Javascript training course at Framework Training



WebAssembly

WebAssembly (aka Wasm) is designed as a portable binary level, virtual machine which can be used within the browser. Any language can be compiled to the WebAssembly binary instruction set. This allows any language to be deployed on the web for client and server applications. Indeed, most of the popular programming languages already have some level of support for WebAssembly.

Currently the WebAssembly versus JavaScript debate is often centred on speed, as WebAssembly aims to provide near native performance compared to JavaScript’s interpreted approach. However, this misses the point, certainly regarding future systems (not least as JavaScript can be compiled to WebAssembly’s binary format). Rather it is that this therefore by passes JavaScript and the compile-to-JavaScript camp completely as it allows potentially any programming language to be used for web-based applications. Thus, JavaScript may not be needed at all in the future.

However, by 2024 it is 7 years since WebAssembly was first released and it is notable that since April 2022, WebAssembly 2.0 has been in draft status. With the latest release being on the 18th of July 2024. It might well be that after a much hyped launch (and some security concerns see this site for a discussion of malicious code on WebAssembly sites) it is now too long ago for WebAssembly to really threaten JavaScript directly.

Frameworks and libraries to watch in 2024

There are several very widely used JavaScript frameworks that every JavaScript developer should be keeping their eye on, the obvious ones include React.js, Angular.js, and Vue.js (the big three). Of course, on the server side Node.js and Express are very, very widely used.

Other frameworks to keep an eye on include Redux, Ember.js, Preact, and Svelte.

Of this group Svelte is particularly interesting and it may well be the framework to watch in 2023. It has a unique approach to application development that aims to reduce the time and effort spent by developers creating an application. Once created the application is then completely independent of Svelte.

Framework

Pros

Cons

Use

React.js

Facebook, Flexible, integrates with other frameworks

high learning curve, Single Page Applications (SPAs), View layer of an web app

Any interactive web site

Redux

Predictable state management, unidirectional data flows, middleware support

Large amount of boiler plate code

Predictable state container

Angular.js

Google, Toolset, ecosystem of add-ons, structured apps

Huge learning curve, still evolving, TypeScript preferred

SPAs, Web Apps, large applications

Vue.js

Small, quick to learn, very flexible, performance

Too flexible, focuses on building UI

SPAs, UI of a web app

Node.js

Server side JavaScritp framework, easy to work with

Dependence on callbacks (callback hell), really needs Express on top

Server side sevrices

Express

Provides features needed by node, easy development, easy to learn

Need to understand Node and middleware concepts, templates can be confusing

REST APIs

Ember

Provides useful framework, can be very productive, large user community

not very flexible, can be slow, quiet old

Large web applications

Svelte

No need to write coe, short learning curve, new approach to development

New approach to development, small community, limited feature set

Web apps

Preact

An alternative to React, simpler implementation, fast, easy to learn

small user base

Web Apps

TensorFlow.js

Client side machine learning library with Node.js support for server side applications.

Tensorflow.js is limited to smaller models (compared with non JavaScript versions)

Open source JavaScript Machine Learning suite for creation of ML and AI applications

Summary

We are now in 2024 and we still believe that JavaScript is a language of the past, present and future. Of course, the JavaScript of 2034 or 2044 might well bear little or no resemblance to the language released as ES6 in June 2015! But like the axe that has been in the family for generations, with five new handles and three new heads it will be as important then as it is today!



Would you like to know more?

If you found this article interesting you might be interested in some of our JavaScript courses:


Share this post on:

We would love to hear from you

Get in touch

or call us on 020 3137 3920

Get in touch