JavaScript runs the world—maybe even literally

Lex Friedman has done many long interviews on his popular podcast. Still, the episode with the famous programmer John Carmack It doesn’t have a director’s-cut feel. For more than five hours, Carmack discussed in detail everything from vector operations to Apocalypse, But it’s something Friedman said uncritically that actually justifies the extended run time: “I think if we’re living in a simulation, it’s written in JavaScript.”

To review: JavaScript is what makes static web pages “dynamic”. Without it, the Internet would be nothing like an after-hours arcade, lifeless and dark. These days, the language is used in both front- and backend development for many mobile platforms and apps, including Slack and Discord. And the main thing to understand about this, in the context of Friedman’s idiotic cone, is this: for any self-respecting programmer, actually accepting Like JavaScript is somewhat of a gimmick – just like an art-house filmmaker confesses to Marvel fans.

I think it has something to do with the fact that JavaScript was created in less time than it takes to make a jar of kombucha at home: 10 days. In 1995, Netscape hired a programmer named Brendan Eich to create a language to embed in its browser, Netscape Navigator. The language, originally called LiveScript, was renamed JavaScript upon the promotion of an unrelated language called Java, which had been introduced earlier that year. (When asked the difference between Java and JavaScript, a programmer might jokingly say: “Java is to JavaScript what a car is to a car.”) To this day, few people consider JavaScript particularly well designed. Gai language is accepted, at least Eech. He once said, “I invented JavaScript in 1995, and I’ve been tinkering with it ever since.”

After all, what was his crime? You can easily find tons of blog posts, memes, and Reddit threads sandbagging JavaScript, but my favorite one is four minute conversation Titled “Watt” by software engineer Gary Bernhardt. For starters, imagine showing the present and past forms of verbs to a group of non-English speakers. boil ,boil,Boiled) And to chew ,to chew,Chewed, Then, when you ask them for the conjugation EatWho can blame them for responding? Eat,ate, Similarly, the “Watt” discussion is a blooper reel of JavaScript quirks and unexpected behaviors. Let’s say you want to sort a list of numbers: (50, 100, 1, 10, 9, 5). Calling the built-in sort function in any sensible language returns the list in numerical ascending order: (1, 5, 9, 10, 50, 100). Doing this in JavaScript returns (1, 10, 100, 5, 50, 9), where 10 and 100 are considered greater than 5. Why? Because JavaScript interprets each number as a string type and performs literal sorting, not numeric sorting. Complete madness.

When Friedman says JavaScript runs the world, in other words, he means that our world, like the underlying source code, is largely obfuscated and incomprehensible. This is the equivalent of sighing and saying that given the sorry state of the planet, the Universal Declaration of Human Rights might as well have been written in Comic Sans.

This time, I must admit that although JavaScript is not my favorite language, I still like it. In fact, respect it. So whenever a certain community of programmers argues against it I can’t help but feel a sense of disapproval. Often they focus on flaws that were dealt with years ago. To focus on JavaScript’s core shortcomings is to ignore the fact that any piece of software – and every programming language is, in essence, a suite of software – is amenable to modification and improvement.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from news24alerts

Subscribe now to keep reading and get access to the full archive.

Continue reading