7

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

 3 years ago
source link: https://dev.to/naseki/discuss-javascript-just-died-what-language-should-replace-it-2ak5
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Cover image for DISCUSS: JavaScript just DIED! What language should replace it?

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

Apr 22

・1 min read

Naseki's weekly discussions (4 Part Series)

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!


Twitter | Website | Newsletter

Naseki's weekly discussions (4 Part Series)

Discussion (46)

pic

CollapseExpand

We can't deny that it's been an absolute powerhouse for the web, though.

Oh, that it is! But as some really cynical devs will say: "Y'all got Stockholm Syndrome!" 🤣 I LMAO at this one all the time!

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

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

LOL, PHP is a dinosaur in the tech space! 🦖 Pay your respects! (not gonna lie, PHP is that one lang I just can't wrap my head around 😫 It has its use cases though)

Thread

Thread

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

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

Thread

Thread

Does that matter?

@moopet Uhm, it does not. It was a light-hearted "joke". Thank goodness I'm not a comedian.

And yeah, the age of the language doesn't matter either. Its use case do, along with its benefits and limitations. Cheers.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Makes sense. Legacy code can't be replaced so easily, if at all.

Comment button Reply

CollapseExpand

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)!

Comment button Reply

CollapseExpand

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!

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

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

the-real-story-behind-es4

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

CollapseExpand

have this solutions:

they abstract javascript does not replace it

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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!

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

Not at all! Glad it served as inspiration! 😁 Thanks for the shoutout too, hehe! 😜

Comment button Reply

CollapseExpand

Dart or Rust could be the winner IMO.

Comment button Reply

CollapseExpand

CollapseExpand

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.

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpandCollapseExpand

The only language that comes to mind is "Eengekkanmeervragendantienwijzenkunnenantwoorden"

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK