this post was submitted on 23 Jun 2024
717 points (96.4% liked)

Programmer Humor

19463 readers
379 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 4 months ago (1 children)

The libraries underneath will still allow nonsense at runtime

Only if you use a badly written library. Most libraries have types provided by DefinitelyTyped. Those who don’t are (in my experience) so tiny that you probably aren’t using them; or, if you really wanted, can check yourself.

In the end, if you encounter a bug, it’ still 99% of the time not a library’s fault, even if it’s written in plain JS.

[–] [email protected] 1 points 4 months ago* (last edited 4 months ago)

Like I said to the other person, those are just types over top of JavaScript that can still fail if/when coercion happens under the hood.

I don't even know how to search it now, but a specific example came up on here of a time when JavaScript libraries will cause problems, and problems you can't even see very well if you're expecting it to act strictly-typed.