|
|
|
|
|
by justthistime_
3880 days ago
|
|
Why is reinventing the wheel considered a good thing? javax.time is considered by some to be one of the best, most well-designed general and versatile libraries for date and time related matters out there, regardless in any language. How would things be improved by throwing that away, and inventing something different?
I think keeping the API and providing an implementation for Scala.js is a much more reasonable approach. Designing a date/time requires very rare skills and knowledge that most people lack.
A re-implementation of javax.time means all the documentation, tests and existing code can be re-used and allow correctness checks against the existing implementation. |
|
It's not. There just is no shim for java.time currently! Even worse, there could be licensing issues[1].
EDIT: That, and some of us are unfortunately still on JDK7 until the next Ubuntu LTS. Not that that's scala.js's fault, but it's a practical issue.
EDIT: ... and of course having a duplicate implementation of java.time (JDK + the shim-which-is-basically-a-reimplementation-in-JS) could be considered "reinventing the wheel"! :) If you have to reinvent the wheel, then doing it such that it at least behaves completely consistently across all backend platforms is preferable, IMO.
[1] https://github.com/scala-js/scala-js/issues/1618