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

Programmer Humor

19149 readers
943 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] 14 points 2 months ago

Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided "Don't break the web", these weird quirks are kept in modern interpreters/compilers.

It's actually quite interesting to read through the logic to follow when implementing an interpreter:

https://262.ecma-international.org/13.0/#sec-object.prototype.tostring