this post was submitted on 11 Jul 2025
242 points (98.8% liked)
Programming
21556 readers
220 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I am a frontend dev. JavaScript (well, TypeScript) is my bread and butter. Even knowing its quirks I never would have thought how inconsistent
Date
actually is. I encourage everyone to try this quiz.This is what JavaScript haters should bring forth, not
0.1 + 0.2 !== 0.3
!Floating point rounding issues are basic comp science issues. Hopefully nobody thinks that those are JavaScript quirks.
Unfortunately, people do.
Or the ones where people point out how inconsistent JS is with adding strings to numbers.
Yeah, maybe don't do arithmetic on numbers as strings?
There is a reason almost everyone use some Date lib, like Luxon and not the built in. And well, having a horrible built in lib that they can't change due to legacy code breaking is nothing really new or unique to JS.
The built-in lib is fine for basic stuff unless you do some crazy shit like expecting
"2"
to parse as a valid date.For very basic things maybe, but it has a lot of other weird problems and restrictions. Mutability, no real timezone support, very limited arithmetic, to name a few. As soon as you move beyond the very basic, you want someting more robust.