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

Programmer Humor

18292 readers
2407 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
[–] 9point6@lemmy.world 15 points 1 week ago (8 children)
[–] bahbah23@lemmy.world 25 points 1 week ago (2 children)

I've read different defenses for JavaScript for cases like this, which usually runs somewhere from you shouldn't be doing that anyway all the way up to if you just understood the language better you'd know why. While I agree with both of those points strongly as general principles, JavaScript also violates the principle of least surprise enough to make it concerning.

For what it's worth, I do like JavaScript. I really don't think that there is any perfect programming language.

[–] 5C5C5C@programming.dev 14 points 1 week ago (3 children)

I really don't think that there is any perfect programming language.

You'd be wrong 🦀🦀🦀🦀🦀

[–] 9point6@lemmy.world 11 points 1 week ago (1 children)

That's a weird emoji to use for elixir

[–] sparkle@lemm.ee 3 points 1 week ago

Elixir? Is that the weird older cousin of Gleam?

[–] skulbuny@sh.itjust.works 3 points 1 week ago

Compile times say otherwise

[–] bahbah23@lemmy.world 2 points 1 week ago

Fair, I haven't used Rust so I don't really have an opinion on it.

[–] palordrolap@kbin.run 8 points 1 week ago (1 children)

JavaScript, like some other languages of the time, was designed with the Robustness Principle in mind. Arguably the wrong end of the Robustness Principle, but still.

That is, it was designed to accept anything that wasn't a syntax error (if not a few other things besides) and not generate run-time errors unless absolutely necessary. The thinking was that the last thing the user of something written in JavaScript wants is for their browser to crash or lock up because something divided by zero or couldn't find an object property.

Also it was originally written in about five minutes by one guy who hadn't had enough sleep. (I may have misremembered this part, but I get the feeling I'm not too far off.)

[–] zarkanian@sh.itjust.works 5 points 1 week ago

It was 10 days, but, yeah, not a lot of time, especially for one guy. (That one guy was Brendan Eich, by the way.)

load more comments (5 replies)