r/programminghorror • u/enmaku • Dec 04 '25
This sub in a nutshell
console.log(1 == '1'); // true
console.log(0 == false); // true
console.log(null == undefined); // true
console.log(typeof null); // "object"
console.log(0.1 + 0.2); // 0.30000000000000004
[] == ![]; // trueOMG you guys what weird quirky behavior, truly this must be the single quirkiest language and no other language is as quirky as this!
1.1k
Upvotes
325
u/HildartheDorf Dec 04 '25
All languages have quirks, but JS is more quirky than others.
125
u/Ved_s Dec 04 '25
JS just has to maintain 50 years of backwards compatibility. same as C. and C++ for some fucking reason
40
u/ToaSuutox Dec 04 '25
In lua, 0 is considered true
18
u/r2d2rigo Dec 05 '25
Judging by the latest posts and the amount of downvoting going in this one, it feels like this subreddit has been overtaken by junior frontend developers making it even worse than r/programminghumor.
7
u/ForestCat512 Dec 04 '25
Wait until you work with erlang/elixir and just want to see your sorted list figure out the language turned it into: èšñ¥*@
11
u/nimrag_is_coming Dec 04 '25
C is quirky cause it's low level and has very little abstractions. Which is why you can do cursed shit like 4[array], which is the same as array[4], because it just translates to *(array+4).
JavaScript is quirky because it was designed in like 2 weeks to try and make everything work no matter what, even if it makes no sense, and made some very, very poor design choices that they can't fix because it'll break half the sites on the web which rely on the weirdness (see the === operator for an example).
5
u/ICantBelieveItsNotEC Dec 04 '25
It makes me wonder if there's a way to prove that all languages with a certain set of very basic properties will be "quirky". Is it a consequence of Godel's Incompleteness Theorem?
6
u/besthelloworld Dec 04 '25
Who is the person on the left??? Like what's the naivety in that position? I feel like this is just a misuse of the bell-curve meme.
17
u/piplupper Dec 04 '25
Am I too JavaScript-pilled to think all of these make sense? You just need the tripple equals === for most of these
10
u/potzko2552 Dec 04 '25
It doesn't matter what you draw on the meme, js is objectively weird even when compared to most languages
13
u/edo-lag Dec 04 '25
Look look I portrayed myself as the 300+ IQ wise wizard because I have an unpopular opinion!
Javascript is quirky (broken) because it was made in like 10 days. You can't call all languages that just because you believe in some kind of language parity.
2
u/NxrmqL Dec 05 '25
The best useful "quirkiness" I've seen is in python. I love the crazy oneliners Here's a bit of code I wrote today for Advent of Code:
code here (I know it's not on one line)
5
u/marquoth_ Dec 04 '25
9 times out of 10 when somebody posts one of those "javascript bad hurr durr durr I am very smart" memes, the thing they're talking about isn't even a javascript issue - it's usually floating point arithmetic or something like that, and javascript is just following the spec.
4
u/Praxis8 Dec 04 '25
JS doesn't have feelings, and we can make fun of it all we want.
2
u/Svizel_pritula Dec 04 '25
I love how most posts about JavaScript's quirks are 50 % quirks of IEEE 754 floats, which are the same in every language running on hardware made in the past couple of decades. What, you mean to tell me floats have finite precision and cannot represent all real numbers exactly? Wow, JavaScript, am I right?
(Actually, it's mostly one post that gets reposted all the time.)
1
u/TheTrueXenose Dec 05 '25
Nope binary is pure 😋
1
u/MuslinBagger Dec 05 '25
true true
1
u/Xirenec_ Dec 05 '25
Thats just floats
1
u/gitpullorigin Dec 06 '25
Haha, so truethy
1
u/Plus-Weakness-2624 Dec 06 '25
Even Rust which people glaze is weird and quirky; don't even get me started on Haskell!!
1
u/TanukiiGG Dec 06 '25
I can't with php dude 😭
1
u/suskio4 Dec 07 '25
I need a table with languages and their quirks. Maybe even a database
1
u/va_str Dec 09 '25
But have you considered that Javascript bad?
1
u/Jimmyboro Dec 04 '25
The best one I have ever seen of these is the Frankensteins Monster graph.
-2
u/TheChief275 Dec 04 '25
I think it’s because most programming language features actually have some thought put into it.
JS’s features on the other hand…
0
u/Creepy_Jeweler_1351 Dec 05 '25
JS is shit!
And this shit feeds me!
And I love this shit!
-4
u/Souseisekigun Dec 04 '25
Programming language design does not exist. All languages are basically just the same. The the fact that the languages that were hastily thrown together then used extensively outside their original domain are also the ones that are the most "quirky" is mere coincidence. People probably just hate them because they're popular. Also, I have already depicted myself as the chad and you as the soyjack.
-5
u/DT-Sodium Dec 04 '25
Yeah no, in no other language have I created bugs by for example forgetting that typeOf(someArray) returns object.
0
u/5alidz Dec 05 '25
Unfortunately whatever your taste is, it doesn’t matter at all, no one gives a singular fuck. You learn and understand anything that gets the job done and that’s as deep as it goes. All of this is a fucking waste of time and energy
0
u/Simple_Project4605 Dec 05 '25
Nuh-uh, Eiffel is perfect
0
u/Daytona_675 Dec 05 '25
except for nextjs. that is just RCE
0
u/-nyoki-not-guhnoki- Dec 05 '25
Learning JavaScript rn and I think JSFuck would be easier to learn.
0
u/tugaestupido Dec 06 '25
Insane cope
0
u/SpookyLoop Dec 08 '25
It's incredible how this meme, no matter what it's saying or what stance it holds, gives off "overconfident room temperature IQ" vibes and makes me want to disagree with it.
Like the complete inverse of the OP was posted just a day or two ago, and elicited the exact same feelings out of me.
-1
u/[deleted] Dec 05 '25
Modern JS fixes a lot of these issues...
-10
u/Comprehensive_Fee250 Dec 04 '25
Functional languages like OCaml do not have quirks.
4
u/[deleted] Dec 04 '25
brainfuck is pure, especially the boolfuck dialect with infinite memory to both sides. There is nothing weird nor quirky.
-5
u/AnywhereHorrorX Dec 04 '25
JavaScript is terrible. I hope it gets exterminated.
16
u/[deleted] Dec 04 '25
[removed] — view removed comment