this post was submitted on 14 Jun 2024
496 points (95.6% liked)

Programmer Humor

19809 readers
149 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Ziglin@lemmy.world 6 points 6 months ago (1 children)

But the CPU would be thoroughly confused in many cases. Like if you added a number with a string. This means low level tools have too and therefore people who do low level programming are confused and the generally carefree has rules can make it difficult to debug js.

Also I think rust making you write "safe" code unless you explicitly tell it otherwise is a great thing.

So I think that tools telling the user that they're doing something wrong is great, tools telling the user to stick with physical limitations for better performance are completely valid but what js does seem really weird with having constants be reassignable, making them nothing but labels combined with HTML I find it even more annoying.

[–] Justas@sh.itjust.works 2 points 6 months ago (1 children)

['a'] + ['b'] = 'ab'

Gets me every time.

[–] Ziglin@lemmy.world 2 points 6 months ago

I'm always more confused by adding integers to strings or something being an empty object because something else was undefined and the console didn't bother to tell me.