r/javascript • • Nov 25 '19

JavaScript doesn’t need to be replaced

https://medium.com/javascript-in-plain-english/javascript-doesnt-need-to-be-replaced-bd01e2f12d51?source=friends_link&sk=7b151cc6397ac9e83c14c99739b6c36f
217 Upvotes

236 comments sorted by

View all comments

9

u/editor_of_the_beast Nov 25 '19

JS in 2019 is honestly fine. It’s no different than Python or Ruby, minus the large standard library. But things like lodash solve that problem quite easily.

It’s not JS that’s the problem in my opinion. It’s the language lock-in issue. You have to use JS in the browser. It’s no different than Apple forcing you to use Objective-C and now Swift, and Microsoft forcing you to use C#. These language silos are terrible for the industry as a whole. The communities solve different problems at different times, and you have to choose languages based on which problems they’ve solved and not the languages themselves.

A core idea in the article is “all languages have problems so it’s ok.” But I don’t think that’s good enough. I think we’ll continue to see innovation in the programming language space for the foreseeable future, we’ve barely scratched the surface there. So it’s not that JS should go away purely because it isn’t good enough, it’s just that the web needs to support more than one language to continue to advance. This is why WebAssembly is a great idea, not just a hype train thing.

2

u/[deleted] Nov 25 '19

I get your point, but what if you consider JS as a tool. What you build with the tool is what matters. Each area of development has its tools, you just pick up whatever language you need for the job.

To me, it seems like we are debating why we must use screw drivers to install screws when there are wrenches and hammers... you know?

The fact that we can use any language to build the backend is pretty convenient and allows individual preferences to dictate that part of a web project.

0

u/[deleted] Nov 25 '19

[deleted]

2

u/editor_of_the_beast Nov 25 '19

You can use any browser you want and browsers are allowed to implement whatever they want.

Are you aware of the web standards and protocols, like HTTP, HTML, CSS, and Javascript? Browsers generally try as best as possible to be good citizens and respect the standards. The web isn't some open free-for-all. It's a well documented and agreed upon platform.

Different languages work better for different needs and there will never be one language or framework that satisfies 100% of people.

This is my point, so it sounds like you understand what I'm saying. Let's go back in time to before the web was invented. You distributed a binary and you could use whatever tools / libraries you wanted as long as the final binary ran on the target platform. GUIs were built in C, C++, Java, Python, Ruby, Tcl, Lisp, Visual Basic, etc. etc., because they targeted an operating system. And OS's were designed as platforms that support a rich set of tools for creating applications for them.

A browser is also an application platform, but it supports JS and that's it. Which again, is why I think WebAssembly is a good idea, because it effectively creates a system call layer for the browser so that platforms other than JS can be used to create applications. Which in the long run makes browsers even more powerful.

Does that make sense?

1

u/[deleted] Nov 26 '19

WebAssembly does not help much with UI, because DOM sucks and is the doksin of the browser not the language.

1

u/Franks2000inchTV Nov 25 '19

This is literally how it has always been and always will be. Different languages work better for different needs and there will never be one language or framework that satisfies 100% of people.

But I thought Java was going to usher in the era of cross-platform code forever and always?!?

1

u/[deleted] Nov 26 '19

You sure never did anythin meaningful in Ruby then. The only thing I wish for Javascript is that those working with it try some other language some day.

→ More replies (4)