DEV Community 👩‍💻👨‍💻

Cover image for JavaScript, the worst programming language on the planet
Thomas Hansen
Thomas Hansen

Posted on • Originally published at aista.com

JavaScript, the worst programming language on the planet

There are quite a few candidates for the worst programming language the Earth has ever seen. C++ is arguably software development schizophrenia. Java, its managed counterpart, with its rubbish exception handling, literally turns "encapsulation into an unproven theory". The average PHP file looks like something your cat sprinkled in its litter box in the morning after eating its breakfast. And Python on the other hand, is so slow you can literally eat breakfast yourself, while waiting for a loop to finish counting to 7. However, they're all bleak in comparison to JavaScript. JavaScript is the worst programming language on the planet, by far!

Don't get me wrong, there's a lot of great ideas in JavaScript. I love its dynamic nature. I adore its functional abilities. And since it's literally the only thing our browsers accepts, we're unfortunately stuck with it for the unforeseeable future. However, if you for some reason decide that you want to create your own programming language, do me a favour; Study JavaScript, and just make something completely opposite of it. Because that would literally create guarantees of that it would become a bajillion times better than JavaScript.

JavaScript is basically Lisp with brain damage

I once at replied Brendan Eich on Twitter saying he created JavaScript in 30 days. At which point he replied to correct me and said "11 days". I was tempted to reply; "That explains a lot of things". However, I kept my thoughts to myself ... ;)

In fact, the only positive thing I can say about JavaScript, is that it was better than VBScript, and that it was an open language, contrary to SilverLight and Adobe Flash. That's literally where my ability to speak nicely about JavaScript ends.

I don't mean to bash on Brendan. Brendan was one of the original heroes from the browser wars, and I personally know a lot of his colleagues, and he did great stuff with the allocated resources at his disposal back then. However, if you study JavaScript, please do not fall in love with it, because at the end of the day, its ability to allow declared variables to "fall through" scopes, its abilities to re-defined "this", and its lack of consistency on null/undefined/"God knows what", is the very definition of how to create a garbage programming language.

My partner sent me a link to somebody generating NodeJS code on the backend the other day. I think the idea was to show me a competitor to Aista. When I had explained a couple of things, his reaction was "Ahaa! ;)"

And no, I will not even link to them. Generating NodeJS code as an alternative to manually creating your HTTP REST API backend yourself, is basically the same as inventing a machine that spreads your cat's litter evenly applied to all walls in your living room. And I quite frankly don't want to have children believing that this is a sustainable way to generating backend APIs. If you want to play with a real programming language, that allows you to generate real backend APIs, you can find our stuff below. The reason why it's the only sustainable way to generating web APIs, is because unfortunately it's the only meta programming language in the world. Now you know ... ^_^

Because, have no doubt; JavaScript is the worst programming language on the planet!

Top comments (47)

Collapse
 
joelbonetr profile image
JoelBonetR

And yet you used JavaScript to make your meta whatever thing work.

Image description

Collapse
 
polterguy profile image
Thomas Hansen Author

Hehe, I even explain why in the article ^_^

But seriously Joel, do you honestly disagree with this one ...? ;)

Collapse
 
joelbonetr profile image
JoelBonetR • Edited on

I coded professionally with C++, ASP, Java, PHP, C#, JavaScript among others and also with C, Python etc for learning purposes.

I doubt you've any knowledge (beyond the surface at least) on any language mentioned in the post.
Just few concepts you repeatedly saw in programming humor websites or channels that you bring here with the expectation to find other people with the same source of truth and lack of experience applauding the text. "HAHAHA JS BAD".

Just quick sentences around: Java isn't the "managed counterpart" of C++, both are very different in every single detail (RE, compiler output, target etc etc etc).

JS was made in 11 days. When the aim of JS was to add a bit of interaction capabilities to the client side in websites. It's been a long journey of updates those near 30 years.

I coded a financial system tool for a specific niche on a company I worked in.
It took me 24 days and it had a revenue of >4m€. Now it has a revenue of >15m€ and it didn't happened just by existing. Many good devs keep working on that since the day I pushed it into production thus nobody can say "it was coded in 24days and it worths >15m€" without being completely wrong.

JS has become more convenient than other languages for several applications such high availability backend services thanks to it's async nature, also for anything that needs to be coded fast with low maintenance costs and it's that good in frontend that tones of people choose to use it to code mobile Apps and one of the best IDEs is coded with JavaScript. I'm talking about VSCode which is built with Electron.

I think that the evolution of JavaScript is one of the best things that occurred to the industry and still, that doesn't make other languages "bad". There are tones of languages out there and each one has a purpose and a target niche where it shines.

If I had to put a language (of the mainstream, widely used) as the worst one I'd choose PHP probably. And not for the lang itself but for the people maintaining it, it hasn't even lambdas in 2022. It's struggling to keep up with the industry demand since long time ago.

Thread Thread
 
fjones profile image
FJones

I would only disagree on PHP being the worst (heck, it kinda sorta does have lambdas these days). Though I do agree that the core devs are to blame for its sorry state. The language is in a phase where it can't decide whether it wants to be a significantly worse Java, or something actually useful.

From a language design point of view, I'd put groovy pretty high on the list of worst programming languages, because that's really a mess of trying to mix the best of four worlds without actually grasping any of them.

Thread Thread
 
polterguy profile image
Thomas Hansen Author • Edited on

I doubt you've any knowledge (beyond the surface at least) on any language mentioned in the post

I'm not going to spend a lot of time arguing with you - However, as an interesting piece of fact, I think I'm quoted in the C++ std, and I (for sure) used to have an outbound link from Bjarne's homepage due to (his words); "having created a GUI library the way it should have been implemented by the std committee" ... ;)

It's been a long journey of updates those near 30 years

Two words; "backwards compatibility" ... ;)

I could probably debunk most of the other parts of your comment too - However, I don't have time since I'm going swimming with my wife, my son and his girlfriend ... :)

Have a nice day ^_^

Thread Thread
 
joelbonetr profile image
JoelBonetR • Edited on

Then it's even worse.
If your "credentials" are what you say they are, you write controversial posts not by lack of knowledge but on purpose. It's quite sad because you could well get the respect of the community by sharing and teaching, instead you act like this kind of people that just want to watch the whole burn.

Despite that I put in doubt those anyway for the contradictions in your words from post to post and comment to comment. I'm not gonna judge your product because I've no interest in trying it but you look more like a salesman than an engineer.

Thread Thread
 
polterguy profile image
Thomas Hansen Author • Edited on

As the CEO of a startup you have to be both? However, is there something wrong with being a salesman? And, do you honestly disagree with the premises of the article? A piece of advice, either keep on dodging my question, or take some time before you answer. I suspect if you answer before thinking, you’ll end up answering “sub optimal” … 😉

Thread Thread
 
joelbonetr profile image
JoelBonetR • Edited on
As the CEO of a startup you have to be both? However, is there something wrong with being a salesman?

Yes and no repsectively, that doesn't mean you suddenly forget about one of both "roles".

I already answered in the comment above but if you want more:

if you for some reason decide that you want to create your own programming language, do me a favour; Study JavaScript, and just make something completely opposite of it. Because that would literally create guarantees of that it would become a bajillion times better than JavaScript.

Maybe you can inspire us by designing and publishing a language on your own.

The only issue JS has is retrocompatibility and any quirk can be extrapolated from this fact, on the rest is overall a first-class multiparadigm language. Do it needs a V2 and break the compatibility with the V1? Probably.

Can a generic polyfill tool solve the gap in between so we can start from a new checkpoint on JS's history? Probably as well. We're in the best time to think about this topics.

Retrocompatibility and evolution should happen in every language and piece of software, which is something difficult to handle and many decisions have to be made, some good, some not so good.

If you are going to create a new lang for any reason you'd do better checking JavaScript, at least the best parts of it and doing exactly the same.

If you don't like it it's OK, I'm not gonna judge your tastes 🤷🏻‍♀️

Thread Thread
 
polterguy profile image
Thomas Hansen Author

Maybe you can inspire us by designing and publishing a language on your own.

OK, Hyperlambda - Been there, done that! Thx for giving me an opportunity to “sell our stuff”. Anymore questions …? 😂😉

Thread Thread
 
joelbonetr profile image
JoelBonetR

Yes please, where can I get the lang, the environment and so on? I just see a suscribe button

Thread Thread
 
polterguy profile image
Thomas Hansen Author

here. But I suspect you knew that already … 😉

Thread Thread
 
joelbonetr profile image
JoelBonetR

Nope, that's not a programming language, it's a tool.

Thread Thread
 
polterguy profile image
Thomas Hansen Author

that's not a programming language

Alan Turing would object to that statement, considering it's Turing Complete and allows you to do most things other languages allows you to do ...

But in fact, I think I've already fallen in love with that statement to the extent that I think we'll rebrand it as "a tool" :D

Collapse
 
anstroy profile image
Aus G

Dude!

Asp.net was created on an airplane by Scott Guthrie.

Apple started on a garage.

Microsoft as well inside a garage.

Great things started small...

Yes it is messy! But it is definitely not the worst at all! The only goal of a programming language is to develop stuff and we have billions of apps being developed in JS right now.

Remember that "Software ate the world, the web ate software, and JavaScript ate the web." source

Collapse
 
polterguy profile image
Thomas Hansen Author

Asp.net was created on an airplane by Scott Guthrie

I didn't know. Do you have a source? I believe you, I'd just love to read the story. Loved your quote :)

Great things started small

I don't disagree, and JavaScript has a lot of nice things going for it. However, if we believe things are perfect there is no room for improvement. A lot of kids learning to create software today believe things are perfect as is; OO, JS, you name it. I'm just there to remind them it's not ... ;)

Collapse
 
anstroy profile image
Aus G

Sure, codemag.com/Article/1203013/ASP.NE... and just do a CTRL + F and lookup for "Austin"

Thread Thread
 
polterguy profile image
Thomas Hansen Author

Thx, that was ASP.NET MVC though and not ASP.NET. The latter is a much larger project. Still an interesting story ...

Collapse
 
devdufutur profile image
Rudy Nappée

Since you smashed most used langages, please tell me which of them you consider as good ?

Great series by the way, it's important to take a step back sometimes. I completely agree when you spoke about Kafka and others cqrs BS (even if you makes me yell in a lot of others posts)

😘

Collapse
 
polterguy profile image
Thomas Hansen Author

even if you makes me yell in a lot of others posts

Hahahaha :D

You can't create an omelet without breaking a couple of eggs ... ^_^

Since you smashed most used languages, please tell me which of them you consider as good

Paradoxically, it's almost consistently "old and outdated" languages, such as Lisp for instance. I've created a couple of languages myself; Lizzie being one. Not sure I'm 100% satisfied with it though. However, today I almost exclusively write in Hyperlambda (our own language), C# when I have to (to extend Hyperlambda), and TypeScript. TypeScript and C# is mostly because I "have to" though, and I tend to use both languages more in a functional style than its pure OO way ...

Collapse
 
devdufutur profile image
Rudy Nappée

I like the "purity" of lisp but I find JavaScript used in FP style much more readable.

And don't you have the same discontent to c# than you have to java ?

Thread Thread
 
polterguy profile image
Thomas Hansen Author

JavaScript can be used in a great way, you just have to amputate most of its OO rubbish first, in addition to 90% of its other parts ofc. C# have the same trait, and most of the new ideas added to it the last decade have been functional constructs. It's almost possible to write entirely "functional code" using C# today in fact, in addition to that its runtime has evolved to become an amazing stack since .Net Core.

However, I really don't know to be honest with you, and I'm not sure if I truly like any of the so-called "modern and popular programming languages" most people have heard of today. At the end of the day, I'm mostly writing these articles to make people stop and think really. If I'm right in everything I say is actually less important to me ... :/

Like you said; "Sometimes it's important to stop and step back a bit to look at things neutrally". Our profession is filled with a myth, which is that "IT is developing so fast". For anybody having been around, watching C# spending almost 2 decades before being able to catch up with 50% of Lisp, that was created in the late 1950s, such ideas are troublesome. Joel Spolsky wrote a great blog about it two decades ago, it was called "Fire and Motion" - You should read it. It kind of explains my motives to some extent ...

As to Polish notation in Lisp - Yup, hate it! :/

Thread Thread
 
devdufutur profile image
Rudy Nappée

I'll definitely read that.

Have you tried reverse polish notation (postscript for example) ? Same sh** without a Lot of Insane and Stupid Parenthesis (LISP) 😁

Thread Thread
 
polterguy profile image
Thomas Hansen Author

Hehehe, Lizzie that I linked to in one of my previous comments is not using Polish notation. Besides from that, it's basically a "super stripped version of Lisp" (no macros, and none of the really fancy stuff, but fundamentally "the core" from Lisp). However, I'm really into meta programming these days, which reduces the candidates down to one; Hyperlambda (another one of my languages) ...

Collapse
 
jwp profile image
John Peters

I agree and hated Javascript for 15 years. It's unique position in the browser world forced us to accept it. Today I like it but find TypeScript superior. Either way, those two and C# can make a career.

Collapse
 
polterguy profile image
Thomas Hansen Author

TypeScript is very impressive :)

Collapse
 
fjones profile image
FJones

And since it's literally the only thing our browsers accepts, we're unfortunately stuck with it for the unforeseeable future.

Do I need to list all the wasm-targeting compilers, or are you just going to continue being the poster child for all the stereotypes about condescending arrogant developers?

Collapse
 
polterguy profile image
Thomas Hansen Author

What does wasm have to do with things? That’s like arguing CISCx86 assembly is beautiful because of C# … 😕

Collapse
 
joelbonetr profile image
JoelBonetR

FJones is telling you that you can use any other language, compile to wasm and thus avoid using JavaScript at all.

If you hate JS so much it will be the easy go-to.

Thread Thread
 
polterguy profile image
Thomas Hansen Author

Why would I want to do that? I’ve already got Angular and TypScript …? 😉

Collapse
 
tsolan profile image
Eugene

Can I just ask, what you think about Rust?)

Collapse
 
polterguy profile image
Thomas Hansen Author • Edited on

I have not studied it. However, creating a "better C++" is not a big feat. At the same time, everything that makes C++ obsolete purely logically MUST be a good thing ... 😉

Collapse
 
bwca profile image
Volodymyr Yepishev

But that's my only line language :O

Collapse
 
polterguy profile image
Thomas Hansen Author

Hehe, don't worry, it's still a valid profession. Just don't create a new language and be inspired by its structure ... ;)

Collapse
 
tomyo profile image
Tomas Hayes

Cool tool, although I was hoping to read more about the title.

Collapse
 
polterguy profile image
Thomas Hansen Author

Thank you. Going too deep in on JS would just reiterate what others have said a million times. I go through some of its primary pain points though ...

Collapse
 
evelyndale profile image
Evelyn Dale

I'd genuinely like to know if you think that this kind of post (of which you have many) is actually providing any value besides getting people to agree so you all feel good patting yourselves on the back for being so smart and edgy for just making an observation that's been regurgitated millions of times over the years, or if you admit to yourself that all the articles you write here are just to promote your product by getting attention from "hate reading". I've got to admit, it seems to be working because you do drive a lot of discussion on your posts; hell, this response is proof of that. How good is the conversion rate for readers of your articles checking out your product?

Collapse
 
polterguy profile image
Thomas Hansen Author • Edited on

hell, this response is proof of that

I've got 40K readers per week now at DEV. Up from 10K a month ago, and we're getting 300 to 600 unique users on our website per day. So yes, it is working. In fact, I wouldn't be surprised if I'm the "fastest growing author on the platform, like ever, throughout its history", arguably adding equally much value to DEV as a company, existing in symbiosis with those getting paid to actually be here.

This technique is often referred to as "aggressive marketing strategies", and it's been applied by thousands of companies before me. However, me actually admitting that, arguably makes me more honest than most others having applied it earlier. When that's said, I agree 90% with all of my writings, and the parts I don't agree with, have moral justifications in that they force people to think - Including you may I add ... ;)

Psst, thinking is a GOOD thing ... ^_^

As to why I'm applying it, I have answered that several times before, and my answer is (still) as follows; "Unfortunately the world has grown so shallow that unless you've got boobs, or create cognitive dissonance, resulting in that all those disagreeing ends up commenting, attracting more readers to your OP, you're basically 'automatically uninteresting' - I have no boobs, so here we are" ...

Psst ... ^_^

This just now

This just now ^_^

If I'd guess, I'd say 98% of it is due to my "controversial brutal honesty based articles" here - Which doesn't invalidate a single one of my points may I add ;)

Anymore questions ...?

Collapse
 
urielsouza29 profile image
Uriel dos Santos Souza

Marketing to sell your own solution!
Nothing new on the front.
Old strategy.

Collapse
 
polterguy profile image
Thomas Hansen Author

Does it change the facts? Do you disagree?

Collapse
 
aeonexe profile image
Hrtzt

First everyone wanted to be a dj, next everyone wanted to be a Star wars fan, now everyone wants to hate javascript, its just a trend, it will pass.

Collapse
 
polterguy profile image
Thomas Hansen Author

I’ve coded in JavaScript since Netscape. I can guarantee you it’s not a “new trend” …😕

Collapse
 
aeonexe profile image
Hrtzt

Ok if You Say it is im ok with your arguments but in the general scope everyone is hating it but everyone is using it, i understand that if its everywhere one has to use it anyway but it must have more good things to be so popular this days, it cannot be other way, so i see it like a trend since anyone reeds an article like yours and starts having the same point of view

Thread Thread
 
polterguy profile image
Thomas Hansen Author

but it must have more good things to be so popular this days

Everybody has to use it, since it's the only (real) alternative to creating browser based apps ... :/

i see it like a trend since anyone reeds an article like yours and starts having the same point of view

JavaScript has been hated for decades, believe me. Just look at the meme I used. There are thousands like it ...

Collapse
 
fjones profile image
FJones

it was better than VBScript

So that title was a lie, then.

Collapse
 
polterguy profile image
Thomas Hansen Author

Hahaha :D

Looks like it ^_^

However, VBScript's primary disadvantage wasn't as much the language details as it was the fact that it was proprietary and closed ... ;)

Collapse
 
kptengco profile image
kptengco • Edited on

still, people are using these apps built from JavaScript 😅

  • Visual Studio Code
  • Postman
  • Facebook Messenger mobile app
  • Slack desktop app
  • Twitch
  • Microsoft Teams desktop app
  • Figma desktop app
  • WhatsApp
Collapse
 
polterguy profile image
Thomas Hansen Author

I once created a search engine in Perl using XML as my “database”. True story from 1998 😂

It doesn’t change the facts. Hint; If you want to know the facts, Google Erik Naggum Perl rant 😉

Visualizing Promises and Async/Await 🤯

async await

☝️ Check out this all-time classic DEV post