DEV Community

Cover image for DISCUSS: JavaScript just DIED! What language should replace it?

DISCUSS: JavaScript just DIED! What language should replace it?

Thalita G. on April 22, 2021

People usually have a love-hate relationship with JavaScript. It's got its beauty and its unavoidable quirks. We're all familiar with them. We can'...
Collapse
 
grahamthedev profile image
GrahamTheDev

I would imagine one of the old school alternatives to JS would have appeared, Flash, WPF / SIlverlight, ActiveX, VBScript.

And if none of them won I am sure we as developers would have come up with workarounds etc.

I mean I created an animation without JavaScript, CSS or images recently, so I am pretty sure we would have adapted somehow as long as we had HTML (or yet again, a close alternative)!

Collapse
 
dannyengelman profile image
Danny Engelman

But Flash ActionScript was ECMAScript... and JavaScript.. is ECMAScript

Collapse
 
grahamthedev profile image
GrahamTheDev

Well that is fair enough, I mean it is 10+ years since I played with Flash and so my memory obviously didn’t connect the dots!

Thread Thread
 
dannyengelman profile image
Danny Engelman • Edited

Fun fact; ES4 was, partially, implemented in Flash, but JavaScript skipped that version.

the-real-story-behind-es4

Collapse
 
thalitadev profile image
Thalita G.

Shameless plug, but I take it! :p Your post was absolutely genius and I still think about it! Next up you're gonna make an entire framework that uses no HTML, CSS, or JS or something. 🤣

It's hard for me to imagine the web would revert back to these oldies. There's a good reason why some of them aren't even supported on browsers any longer, haha. But hey, who knows!

Collapse
 
grahamthedev profile image
GrahamTheDev

I mean it was so silly I had to share it. But yeah a bit of a shameless plug I admit!

I am building a website that only developers can use...watch this space for that one 🤣🤣🤣

Collapse
 
rangercoder99 profile image
RangerCoder99 • Edited

The browser only understand JavaScript so noting can really replace it for frontend design lots of interactions would no longer be posible or be really painfull to do with just css, and checkbox hacks, for the backend it would just be python

Collapse
 
thalitadev profile image
Thalita G.

Hence my additional text in the post saying that features like DOM manipulation and browser support would be implemented into whatever language you have in mind. 😉

Collapse
 
rangercoder99 profile image
RangerCoder99 • Edited

I saw that but it remembers me the hell we had to pass in the 90s Browser support for Javascript got a lot better over the years (So did Javascript it self) but at the start, it was a huge mess, everyone, doing their own thing, new Javascript features support being slow or having a ton of barely readably hacks in Javascript/CSS so a lot of people resorted to something called Flash that was kinda on the level that is React today, if not bigger, that had its own huge issues with security and accessibility. So it would be really hard to imagine a perfect world that whatever program language would work perfectly and the same in every single browser and on every single device without all the pitfalls that Javascript fix over the years :)

Collapse
 
higginsrob profile image
Rob Higgins

Obvious choice is python as there are already mature web libraries like flask, but my new favorite stack is using lambdas like a normal server. If you go that route you can write them in Java, Go, PowerShell, Node. js, C#, Python, and Ruby. I'm working on a project right now, I wrote the server in node as an (aws) api gateway lambda proxy, without using any libraries. I eventually decided to rewrite it as a node/express server, and it's kind-of badass. The most cost efficient option I can imagine while also effortlessly scaling to meet extremely high demand. Lambda can scale up to 1000 concurrent connections, in theory you would need 125 8 core ec2 boxes to match the "multi-threaded" processing power. That's a pretty bloated estimate as there are other variables that will slow down lambdas, but you get the idea. The second reason I love this system is deployment bliss. It's fast to launch stacks with cloudformation when the heaviest thing it has to do is update a single lambda. This means you can build continuous delivery/integration automation into your dev tooling (github actions), you can quickly launch "staging" stacks, removing the need for a blue/green type system. Updates are immediate and rolling, meaning you don't have to launch the new task before stopping the old task to achieve zero downtime. Ok I'm done geeking out on my new serverless server design.

Collapse
 
desirtechnologies profile image
Jeffrey Desir

Python is half as elegant as ruby with twice the overhead, and less shiny

Collapse
 
higginsrob profile image
Rob Higgins

I'm not getting in the middle of a python vs ruby debate, mostly because I don't care lol. There is nothing wrong with either language but devs will always swear their language is best because it worked well for their specific need.

Collapse
 
matjones profile image
Mat Jones

This is wrong on all 3 points lol

Collapse
 
thalitadev profile image
Thalita G.

Wow, we got a Lambda lover here! 😀 Happy to hear that you found a stack that feels right to you! I've never quite looked into AWS before, but I probably should.

Collapse
 
higginsrob profile image
Rob Higgins

Ha. I've deployed aws ecs in production for years, it really depends on your apps needs. It's been my experience to make a good serverless app you have to write a lot of your own devops tooling. But once that's in place, the serverless nature alleviates all the hardest pain points surrounding scaling, versioning, and zero downtime deployment infrastructure.

Collapse
 
thalitadev profile image
Thalita G.

I look forward to the comments on this one! What on earth could replace JS, if anything? 🤔

My first thought was PHP, which I think is next-level Stockholm Syndrome compared to JS! 🤣 It's giving me physical pain just imagining it.

Collapse
 
stojakovic99 profile image
Nikola Stojaković

On the front-end, pretty much anything if we count on WASM (which is still not that much used in the production but definitely will be in the future).

Languages rarely get replaced. There are tons of COBOL code out there in the wild which couldn't be replaced because many huge bank systems rely on it. You can't just go and rewrite it in something else.

Collapse
 
icecoffee profile image
Atulit Anand • Edited

Python, PHP can replace JavaScript.
BUT DAD WILL BE DAD LOL
On a serious note though, I think a lot of languages like python, C#, java can be great successors.
As I believe.

  • Frameworks are all about declarative programming we don't have to explicitly write the logic.
  • Also Javascript is not C++ so we're not so much concerned about beast mode performance.

Hence It's important but so was Internet Explorer, If you can feel me.

Thanks to @technoglot , I really thought about that after she cleverly tricked us all.
Correct me if I am wrong, just my first thoughts.

Collapse
 
henriquepasa profile image
@fal_pasa

have this solutions:

they abstract javascript does not replace it

Collapse
 
thalitadev profile image
Thalita G.

Thanks for sharing! I'm sure some people who prefer to code in these languages could make use out of this.

Collapse
 
yoursunny profile image
Junxiao Shi

Do you know, you can embed an ActiveX control on the webpage?
All you need is Internet Explorer 5.0, and it doesn't involve JavaScript.

But then, if you have Internet Explorer 5.0, you can run Microsoft VBScript.

 
moopet profile image
Ben Sinclair

PHP is a dinosaur in the tech space!

Does that matter? The question isn't asking about what you'd use if Javascript fizzled out due to old age, it's a genie-in-a-bottle hypotherical.

I don't particularly like PHP, but it's not going away any time soon...

Thread Thread
 
itwasmattgregg profile image
Matt Gregg

Laravel was the best in teaching me good PHP. PHP was how I got started. Oh the days when you would submit a form to a php handler file that could just send emails directly...

Collapse
 
moopet profile image
Ben Sinclair

At the moment, based on the agency I currently work for, I'd be using PHP. Why, you ask? Because that's what I do at the moment.

I'll occasionally break out the Javascript if it's needed, and I find it quite fun to be fair, but I wouldn't be particularly heartbroken if it disappeared overnight.

Collapse
 
thalitadev profile image
Thalita G.

A very reasonable answer! PHP is still very relevant nowadays, so it's definitely not too far-fetched that it'd just take over again.

Collapse
 
devtalhaakbar profile image
Muhammad Talha Akbar

The fact here is that you can't have JavaScript dead even when it is dead. The end of JavaScript is tied to the existing browsers and the existing web. Because of how the web is, we will need progressive adoption of whatever new scripting language we agree on. And, that browsers will need to interpret both languages until all of the web is free of JavaScript. I hope we can see how that will go. It is too much work to properly declare JavaScript dead.

I believe we can't have JavaScript go POOF. Even magically.

If you really hate JavaScript and really want to write websites in a new language, you can write a transpiler for the language you love. Or be a patriotic JavaScript developer and introduce a better version of JavaScript. That, in my opinion, is JSFuck. Haha JK.

Collapse
 
thalitadev profile image
Thalita G.

No hate towards JavaScript, just speculating! I'm not wishing JS dead or something! 😆 All of my discussion posts are merely hypothetical and are less about what is realistic and more about what people are imagining in their heads. :) If you think that's not possible even magically, then you might need more magic dust!

I agree that we can't just get rid of JS in our current state, if ever. JS is simply too deeply tied to the web. I don't see this happening anytime soon, even when WASM really takes off.

Collapse
 
devtalhaakbar profile image
Muhammad Talha Akbar

You're right about getting more magic dust to be able to make it possible. How much more? I guess enough that you will need magic to get enough magic dust. :)

I understand the "imagining" part. I guess I just imagined realistic implications to the end of JavaScript. Hope you can look past that.

I believe we might be tackling bigger issues on the web with advanced technological advancements. Like shift from smartphones to brain chips. But, unless and until that happens, I see JavaScript staying and giving us the good, the bad and the ugly. :) Again, personal opinion.

Thread Thread
 
thalitadev profile image
Thalita G.

I mainly wanted to clarify the intention of this post! I actually really appreciated your comment because it's different from what others have been commenting. I'm definitely learning a lot from the comments, but yours reminds us to hold our horses, because we do need JavaScript in the current state of the web.

I see JavaScript staying and giving us the good, the bad and the ugly. :)

This, by the way, is very beautiful. 💖

Let's love JS while it's staying with us.

Collapse
 
kspeakman profile image
Kasey Speakman

Few people program in the Javascript that your browser actually runs and supports. That Javascript is basically the assembly of the web. So Javascript would be replaced by a different assembly, WASM. And then the explicit language you use won't matter.

Me, I'd use F#. But I already use it and compile it to Javascript. I'd just switch compile targets.

Collapse
 
ashishk1331 profile image
Ashish Khare😎 • Edited

I hated JS because I come from the Java background. But after sometime I fall in love with it. I read "The Good Parts" and "You don't know Js" series, it helped me broaden my knowledge. Then the quirks of it became challenge for me to achieve the job without any insanity. To gain maximum creativity and velocity with your code you need to be bounded. Rethink again, look at your code and ask yourself is it as right and fast as possible. No! Because instead of learning js, you were learning the trend. No, it is not dead for me. On the other hand, I'm getting to know it better. Vanilla!

Collapse
 
k776 profile image
Kieran Pilkington

Joking aside, there are a few good candidates. I spent some time over the years writing various implementations of Conways Game of Life in different languages and learnt a lot: github.com/KieranP/Game-Of-Life-Im...

In my opinion, the best candidate to replace Javascript would be DartLang. It's similar in many areas to Javascript, but significantly faster. And it powers Flutter, a framework for building android and ios applications from a single codebase. I think having the web and mobile coded in the same language could be very helpful/unifying.

Collapse
 
gsdev profile image
gshah2020

If javascript is dead, then the web is also likely dead... so theoretically we've either outgrown the web and there's something shinier to move on to or... the machines have risen up... and well... in that case...

🙌 All Hail our A.I. 🤖 overlords!

Collapse
 
alexmercedcoder profile image
Alex Merced

If javascript died I'd imagine the internet would be fragmented into all the languages compiling to WASM. It's like when Mp3.com was shut down several alternatives came to exist none ever having the same market share or mind share MP3.com had. But I'd probably switch over to Go with WASM unless there was a solid PHP wasm compiler.

Collapse
 
p0lish profile image
p0lish

Dart or Rust could be the winner IMO.

Collapse
 
natalia_asteria profile image
Natalia Asteria

This is a simple question.

Typescript

Collapse
 
thalitadev profile image
Thalita G.

Typescript compiles to Javascript, so it'll die along with it. 😅

Collapse
 
natalia_asteria profile image
Natalia Asteria • Edited

Well, no.

Typescript is technically Javascript's son, so if the parents died, it would just be an orphan.

So, there is TypescriptToLua, it transpiles Typescript to Lua instead of JS. So if JS become too sucky and unusable, basically dead, we can use that.

And we can also make an engine that runs runtime Typescript (that would mean run-time type-checking etc), kinda like V8 but Typescript.

Thread Thread
 
thalitadev profile image
Thalita G.

I see, I didn't know of these options for Typescript! Especially TypescriptToLua sounds interesting, since that could make Lua the replacement for JS while still retaining TS.

Collapse
 
raguay profile image
Richard Guay

Not with Dino around. If Dino replaces the JavaScript engine in a browser, that would be TypeScript directly in the browser.

I remember the Tcl/Tk plugin for Netscape’s browser. That was fun!

Thread Thread
 
natalia_asteria profile image
Natalia Asteria

You mean Deno?

Thread Thread
 
raguay profile image
Richard Guay

yea, I’m a lousy speller. But, most engineers are.

Collapse
 
dastasoft profile image
dastasoft

Maybe nowadays something could be done with Kotlin, I would rather not have to go to a solution from the past like PHP :)

Collapse
 
thalitadev profile image
Thalita G.

I'd take Kotlin anyday over PHP! :) Great choice!

Collapse
 
shaijut profile image
Shaiju T • Edited

I think there should be one Programming language for both Front End and Backend.

This will help us by spending time in building products instead of learning all the new frameworks.

Microsoft has the answer by introducing Blazor

Blazor : Build client web apps with C#

Check out Blazor: dotnet.microsoft.com/apps/aspnet/w...

Collapse
 
alanmynah profile image
alanmynah • Edited

oh god, please, no. Yeah, sure, JS has quirky bits, etc. But if I ever have to sit in another meeting about dependency injection or watch another talk factory factories, i will sign up to trades courses to become a certified electrician, a plumber or a plasterer.

Thread Thread
 
alanmynah profile image
alanmynah

There are people who love this MS lingo of ClaimsPrincipals, or figuring out if a particular interface needs to be added to a service collection as a singleton (or maybe it's transient. Nah, must be scoped), but it ain't me.

 
rangercoder99 profile image
RangerCoder99

But would other none M$ Browsers want it?! Also what about none Chromium browsers like the MacOS one that Apple feels protect their users better, how long till Apple will try to kill other browsers for security reasons the same way they killed Flash?

Collapse
 
bushwald profile image
Brad

Maybe Brendan Eich had the right idea when he wanted to use Scheme as the browser language before Netscape nixed the idea. Now we have Clojurescript and Elm trying to achieve the same thing.

Collapse
 
skorotkiewicz profile image
Sebastian Korotkiewicz

Javascript is not dead, it's doing very well, but if you're looking for an easy and fast alternative to Javascript then I recommend you ELM-Lang. In ELM you can write a new page in seconds.

Collapse
 
thalitadev profile image
Thalita G.

I'm not saying that JavaScript is dead! It's a hypothetical question of what if it suddenly died.

Collapse
 
higginsrob profile image
Rob Higgins

That's not how lambda works. Lambda is the least expensive infrastructure in my org.

Requests $0.20 per 1M requests
Duration $0.0000166667 for every GB-second

Collapse
 
thalitadev profile image
Thalita G.

I've been quite interested in Rust as well! It definitely sounds like a great candidate to replace JS!

It's true that WASM has gone a long way, but within WASM there are quite a few language options, so I wondered which one people would consider the best choice to take JS's throne. :) Rust definitely sounds like a great one for that!

Collapse
 
pontakornth profile image
Pontakorn Paesaeng

First, I assume that the browsers will eventually understand the replacements. If the JavaScript somehow dies, I think there are lots of candidate that can fill this role. I will talk about the languages that can fill JavaScript role if it die.

  1. TypeScript
    Instead of compiling into JavaScript, it becomes a complete language. There will be no more wtf with JavaScript because if it's going to replace JavaScript, it will need to come up with their own power. The new TypeScript will eventually remove all of JavaScript weirdness.

  2. Python
    Because it is a simple language just like JavaScript. Python can model DOM as well as JavaScript and it can become even better. Python is more consistent that JavaScript so it will make development easier.

  3. Dart
    There are already a way to write React and Angular app in Dart now. If the browser can understand Dart just like JavaScript in this day, it can become the main language of writing web application. The downside is the syntax can be ugly. You can see it clearer if you try to develop something in Flutter.

Collapse
 
sidcraftscode profile image
sid

PHP. I started learning it and I like it very much

Collapse
 
thalitadev profile image
Thalita G.

Haha, glad you're enjoying PHP! I can't imagine myself writing PHP all the time for the rest of my life. 😅 Have you looked into Lavarel? I'd definitely recommend it if you wanna dive deeper into PHP.

Collapse
 
sidcraftscode profile image
sid

Hi 👋I’ve looked into Laravel 👀. Thanks so much!!! 😊

Collapse
 
blindfish3 profile image
Ben Calder
10 PRINT "BASIC"
20 GOTO 10
Enter fullscreen mode Exit fullscreen mode
Collapse
 
thalitadev profile image
Thalita G.

Here's the post I was talking about @technoglot ! 💃✨✨ Hope you don't mind the lil poke at your own post's title.

Collapse
 
zilti_500 profile image
Daniel Ziltener

I vote for Clojure.

 
thalitadev profile image
Thalita G.

Ah, so a good candidate has to lack a learning curve. 😀 Makes sense.

Thread Thread
 
faraazahmad profile image
Syed Faraaz Ahmad

I think Zig is a good candidate. It doesnt have the learning curve of Rust and is being built as a direct replacement for C, but seemingly has a simplicity of syntax like that of Python

Collapse
 
aghost7 profile image
Jonathan Boudreau • Edited

The first iteration of Javascript was actually a lisp dialect. So probably that.

You can read about it on the creator's (of Javascript) blog: brendaneich.com/2008/04/popularity/

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

I would create javascript

Collapse
 
thalitadev profile image
Thalita G.

Ha ha, very funny. 🙂

Collapse
 
kspeakman profile image
Kasey Speakman

In the hypothetical future from the OP where JS stops working, I'm sure plans would change.

Collapse
 
edgarmendozatech profile image
Edgar Mendoza

WebAssembly without doubts

Collapse
 
icecoffee profile image
Atulit Anand • Edited


Jk

Collapse
 
itwasmattgregg profile image
Matt Gregg

Has anyone been hanging out in the Elixir/Phoenix space?

Collapse
 
thalitadev profile image
Thalita G.

Replying for a bit of a bump! 😀 What do you like about Elixir and Phoenix?

Collapse
 
vonheikemen profile image
Heiker

crystal would be nice. Looks like a scripting language but it has types. It's cool.

Collapse
 
thalitadev profile image
Thalita G.

Never heard of it before, but it looks very neat! Thanks for sharing. 😄

Collapse
 
desirtechnologies profile image
Jeffrey Desir

Did everyone forget Lua? That was a nice thing, a certain grown-up site still uses Lua for its extern resource calls I heard.

Collapse
 
thalitadev profile image
Thalita G.

I think everyone seems to be focusing so much on what they love in the backend and in there there are a ton of options. A few commenters went for Lua too and I think it makes a lot of sense when focusing on the frontend.

Collapse
 
lucapulina profile image
Luca-Pulina

Maybe flutter (dart)

 
rangercoder99 profile image
RangerCoder99 • Edited

We no longer create for browsers, clients expect apps to work in all Edge market share is too low, to spend extra budget on and mostweb devs hate .net already...😁

 
higginsrob profile image
Rob Higgins

SAM-cli (optional) -> aws cloudformation (optional) -> (aws) api gateway -> lambda proxy

Collapse
 
distil profile image
Charavner Louis

The language that can be read by a web browser.

Collapse
 
cleysonlb profile image
Cleyson Leal Braga • Edited

This scenario is perfect to Flash return 🤣

Collapse
 
mrwolferinc profile image
mrwolferinc

JavaScript is no more? Now what?

Collapse
 
dannyengelman profile image
Danny Engelman

The only language that comes to mind is "Eengekkanmeervragendantienwijzenkunnenantwoorden"

Collapse
 
mikee profile image
Miguel Palacios

Well if JS is dead TS is also dead.... so PHP has always been there, but another alternatives could be Dart/Go or C#... or any other with WASM

Collapse
 
hmida71 profile image
Hmida

how to make a pub like pub games => onclick show pub video

Collapse
 
desirtechnologies profile image
Jeffrey Desir

You guys are all in denial, we need to start using Clojurescript. Everything's going functional anyway, why not abstract away the syntax?

Collapse
 
pixelagil profile image
Alejandro Vivas

pffff

Collapse
 
oniichan profile image
yoquiale

PHP

Collapse
 
stajilov profile image
Vladimir Stajilov

It’s time to deconstruct JavaScript

Collapse
 
navaneethbysani profile image
Navaneeth Bysani

Did it really die? or is it just to discuss if it dies?

Collapse
 
thalitadev profile image
Thalita G.

We're discussing what would happen if it dies.

Collapse
 
felipperegazio profile image
Felippe Regazio

Rust :D

Collapse
 
sohanr profile image
MD. Mizanur Rahman

TYPESCRIPT XD
only typescript can replace javascript haha