this post was submitted on 31 Jul 2024
739 points (99.3% liked)

Programmer Humor

19488 readers
1012 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] 136 points 3 months ago* (last edited 3 months ago) (23 children)

If you think is-number can be replaced with a one-liner, you don't have the enterprise code mindset. What if the world gets more inclusive and MMXXIV, ½ and ⠼⠁ become recognized as numbers? 𒐍𓆾 were numbers in the past but what if people start assigning numeric value to other characters? Are 🖐🔟💯🆢🂵🀌🁅 numbers of the future???
/s

I'm not even all kidding, Regex implementations are split on whether "٣" matches \d.

[–] [email protected] 27 points 3 months ago (6 children)

It's simple ⅯⅯⅩⅩⅣis a number, MMXXIV is not.

[–] [email protected] 26 points 3 months ago* (last edited 3 months ago) (4 children)

You may argue that writiing 2024 as "MMXXIV" and not "ⅯⅯⅩⅩⅣ" is a mistake but while typists who'd use "2OlO" for "2010" (because they grew up using cost-reduced typewriters) are dying out, you'll never get everyone to use the appropriate Unicode for Roman numerals.

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

Wouldn't surprise me if even Unicode advices against using Roman numerals depending on meaning.

It was mostly a joke (though frankly if you try any implementation more complicated than that joke you're going to have a bad time).

load more comments (3 replies)
load more comments (4 replies)
load more comments (20 replies)