Monads when no regex
JavaScript is one of those languages where you'll be doing something, then all the sudden something entirely different happens with certain parameters and you're just like "what. Why" and it doesn't tell you, just says "everything's fine, this is exactly what you asked for, better to drive with no tires than not drive at all am I right?"
This combined with the fact that it is the frontend language and therefore every junior programmer in existence learns it means that a ton of JS you encounter in the wild is just absolute garbage. It's also closely linked with the endless bullshittery of the modern web where a single browser tab takes up 2gb of RAM.
My favorite thing about JS is that it has true and false evaluations that are more guidelines than rules
Pop quiz:
Which is true and which is false?
a)
"false" == true
b)
"0" == true
c)
[] == true
d)
" " == true
(They're all true)
I still think JS is an incredibly useful language, but god damn is the concept of "truthy" and "falsey" just insane.
I disagree, I think python handles it pretty well. JS just has some pretty bad rules for truthiness.
In python:
-
numbers are truthy if they're non-zero
-
containers and strings are truthy if they are non-empty
-
a regex result is truthy if it matched something
-
the None object is not truthy
-
custom objects are truthy by default, but you can define the thruthiness function
-
Just passing empty lists and the integer 0 into random fields.
The JS VMs are written in C++ though. And the databases are implemented in C++ as well. So C++ should be the USSR.
So you're saying reddit > hexbear? hmmm, sounds like something a fascist would say
Me having a giant penors: :lenin-sleeping:
You having a dumb-dumb smooth-brain and shit-covered trousers: :wojak-nooo:
Taking Ivermectin and shitting yourself on purpose to own the commies
Professional pants shitter like when playing screencheat and getting owned by a candle bra