r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Mar 21 '24 edited Mar 21 '24

[removed] — view removed comment

1

u/subject_deleted Mar 21 '24

I just have a deep aversion to fanboyism on anything which a lot of the comments here piqued.

I'm not fanboying at all.... I'm pushing back on the absurdly intense criticism that JavaScript gets for the sole reason that it doesn't explicitly tell you when you fucked up... I'm trying to get people to understand that if they're writing code like that.... It's not the language's fault that their debugging sessions are harder than they should be.

If anything you're acting as a fanboy of the "anti-js crowd".

but to pretend that doesn't come with a host of unsavory qualities,

At no point did I pretend js has no unsavory qualities.... I'm just not putting the blame on the language when developers do stupid shit the language wasn't meant to do.

If a car breaks down because the owner never changed the oil.... It's not a problem of the car. If a 747 crashes because the pilot went rogue and decided to try a barrel roll... That's not a fault of the 747.

Anything can break if you use it in a way that wasnt intended.

Even if I wanted everything to execute no matter what -- Why would I not want to warn the user at the very least when I coerce an object to the string 'Object object' ?

Because 99.9% of users would have absolutely no idea what that means. It's not a helpful error message for them. And the problem should reveal itself in testing, not in production.

It's not that JS throws no warnings or errors, so how can we really defend this without some hero worship of the language because it is known to us?

It throws errors when something is bad enough that it literally can't proceed...

Who's hero worshiping? All I've said is that the fault lies with the people doing stupid shit, not the language they're writing it in. I'm not claiming JavaScript is perfect or divine or free of flaws... I'm saying that it has flaws just like all other languages.

I could sit down and come up with quirky things about every major language... And that task wouldn't do anything to actually make those languages bad. It would just prove that I thought of a lot of ways to break them.