this post was submitted on 04 Jun 2025
1013 points (98.6% liked)

Programmer Humor

23849 readers
2208 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
[–] palordrolap@fedia.io 1 points 1 day ago

Not strictly true.

Perl's default bitwise operators do differentiate between numbers and strings that look like numbers in a way that addition doesn't*, and the readline/glob operator <> does different things depending on what (if anything) is between the signs.

There's also the whole overload pragma for objects, which doesn't affect default data types, but if you're sufficiently perverse, you can define a String class that uses '+' like JavaScript.

* in 2015, they added new operators so that those and the original operators don't overload and have only one specific purpose if the bitwise ~~pragma~~ Edit: feature is turned on. You might know all this already though.