September 22, 2023


Networking, Computer, PBX, IT, DIY Solution

Father of JSON: The best thing we can do for JavaScript is to retire it

4 min read

Father of JSON: The best thing we can do for JavaScript is to retire it

Father of JSON: The best thing we can do for JavaScript is to retire it.

The Stack Overflow 2022 developer survey report released in June this year pointed out that JavaScript has been the most popular programming language for the tenth consecutive year, and is currently used by more than 65% of developers.

But Douglas Crockford, the father of JSON, said in a recent interview that JavaScript has become an obstacle to progress.

“The best thing we can do with JavaScript today is to retire it. Twenty years ago, I was one of the few advocates of JavaScript. The combination of nested functions and dynamic objects is brilliant. I spent ten years trying to correct Its flaws. I had small success with ES5. But since then there has been a lot of interest in further augmenting the Stack Overflow 2022 developer survey reporting language rather than making it better. So JavaScript and Like other ancient languages, it has become an obstacle to progress. We should focus on the next language, which should look more like E than JavaScript. ”

E, which Crockford chose to replace JavaScript, is an object-oriented language designed for secure computing; the language he co-created with Mark Millerde. In Crockford’s words, it “eliminates a lot of the bad parts of Java”.

   Father of JSON: The best thing we can do for JavaScript is to retire it

According to the introduction , Brendan Eich invented JavaScript for Netscape in just 10 days in 1995; “In May, I did 10 days of hard work and I didn’t get much sleep”. Eich said, “I made it… a programming language for HTML, used by web designers and programmers, embedded directly into web pages… The name is a complete lie. It’s not much related to Java, Rather, it is syntactically related to a common ancestor C”. And said it was “a rush job and I knew there would be bugs, there would be gaps, so I made it a very malleable language. This allowed web developers to make it what they wanted. look.”

But along the way, Crockford points out, JavaScript has grown more complex as features have grown, far from Eich’s original concept.

Also, many web developers don’t write JavaScript, instead they write TypeScript that compiles to JavaScript.

TypeScript was invented by Anders Hejlsberg of Microsoft on the grounds that JavaScript’s malleability and lack of type safety made it unsuitable for large-scale applications.

TypeScript also topped the Stack Overflow survey. WebAssembly, a binary format that can be targeted by languages ​​including C, C++, C#, and Rust, is another innovation that could undermine JavaScript’s dominance.

One developer stated in a discussion on Hacker News, “JavaScript has exploded in popularity in just a few short years. Yes, the ecosystem is horribly complex. Even among full-time JS developers, this is An ironic phenomenon, how crazy it has become. We can’t keep up.”

Crockford also pointed out that JavaScript will be difficult to convert, especially since it is the language that every browser supports for DOM (Document Object Model) manipulation.

When asked if there was anything that could replace it in the foreseeable future, Crockford said he had always hoped it could, but in fact there were two difficulties: “First, we don’t have a language yet. It needs to be specialized A minimal-capability-based actor language designed for secure distributed programming. Second, we need all browser makers to adopt it, while replacing the DOM with a well-designed interface.”

In this regard, some netizens on Reddit also expressed their opinions:

As Douglas said before, the DOM is a horrible abstraction for creating applications. It is designed for text documents.

The modern use case of the web is hacked by a technology that is fundamentally designed to properly support a more limited purpose.

The real solution is to replace every browser’s DOM API with something for rendering 2D/3D graphics, taking discoverability, accessibility, and machine readability into account.

This new engine can use any new language appropriately designed to handle this use case.

The concept or website will change in this way. It can be an application via udp/tcp.

I believe JS is a symptom, not a problem.

The limitation of the browser concept itself is the problem, it doesn’t match the purpose for which we use it.


Copyright © All rights reserved. | Newsphere by AF themes.