Re:Dates and Times in JavaScript – A New API for Dates from ...
by pjmlp on Thursday July 09, 2020 @02:48PM
(#23783619)
They are yet to agree how to deal with strings, how do you expect them to agree with time and dates?
[ Parent
| on HN ]
Re:Dates and Times in JavaScript – A New API for Dates from ...
by hyperpape on Thursday July 09, 2020 @03:30PM
(#23784081)
I'm not sure strings are easier. When to use mutable vs. immutable strings has a significant performance impact, how do you manage memory for them (including when do you copy strings vs work with a slice) are all questions where there's at least 3-4 distinct designs that you might want (a C like language, a C++-like language, a Rust-like language, and a GC'd language).
In contrast, for dates and times, everyone really could have used the same design. Maybe you'd need a slightly different design for dynamic languages, but I'm not even sure about that.