this post was submitted on 11 Jul 2025
245 points (100.0% liked)

Programming

21645 readers
231 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 [email protected]



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 37 points 1 week ago (3 children)

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!

[–] [email protected] 25 points 1 week ago (1 children)

Floating point rounding issues are basic comp science issues. Hopefully nobody thinks that those are JavaScript quirks.

[–] [email protected] 6 points 1 week ago

Unfortunately, people do.

[–] [email protected] 13 points 1 week ago (1 children)

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.

[–] [email protected] 2 points 1 week ago (1 children)

The built-in lib is fine for basic stuff unless you do some crazy shit like expecting "2" to parse as a valid date.

[–] [email protected] 4 points 1 week ago

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.

[–] [email protected] 3 points 1 week ago

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?