DEV Community

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

Posted on • Updated on

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

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't deny that it's been an absolute powerhouse for the web, though.

You'll always find Js in the top 10 or even top 5 lists of most popular programming languages. It's also the #1 topic on dev.to!

But what if all of that suddenly went, like, POOF! 👻

Now now, where's this coming from?

First of all, special thanks to @technoglot for the inspiration!

Her article asked this simple question: What would your tech stack look like if JavaScript didn't exist?

I'm a webdeveloper through and through. Naturally, I'd start unpacking all CSS-only solutions! However, I started thinking more about the implications of JavaScript's death, like...

✍ Comment below answering the following question

If JavaScript stopped existing, what language do you think should replace it?

Now, I understand that some programming languages aren't quite ready for things like DOM manipulation and such. Imagine these things would be implemented into said languages.

Or perhaps you have a better version of JavaScript in mind? 😮☝ Let me know!


Thalita logo

Twitter | Website

Top comments (92)

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
 
bezpowell profile image
BezPowell

I think the best answer to this would be web assembly. Being a compilation target, it allows you to work with your favourite language and brings the performance advantages of pre-compiled code and static typing to the web. There's some features like DOM manipulation that aren't there yet, but (I believe) are being worked on. Many browsers already support it, so replacing js overnight wouldn't be such a huge problem.

I love programming in Rust, and my next project is to learn about web assembly. Very much looking forward to replacing js for some of my web code.

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
 
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
 
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
 
desirtech 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
 
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.

 
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
 
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.

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
 
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
 
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.