|
|
|
|
|
by lomnakkus
3892 days ago
|
|
> Why is reinventing the wheel considered a good thing? 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 |
|
Your last point is not the only thing that matters though. If the runtime already ships with packages X, there is no point in shipping your own implementation.
(Which is exactly what Scala/Scala.js does with math stuff: it reuses BigInteger from the runtime on the JVM, but ships its own implementation with Scala.js.)