2 ms·
> ReScript is more correct than scala, ReScript's type system(essentially borrowed from OCaml) is sound while scala is unsound. Ah, I did not make it clear wha
by sjrd 6y ago
> ReScript is more correct than scala, ReScript's type system(essentially borrowed from OCaml) is sound while scala is unsound.
Ah, I did not make it clear what I meant by "correct" in this context. I meant "faithful to the original language" (OCaml natively compiled and Scala on the JVM).
You are of course right about the type systems. (I believe many soundness holes are fixed in Scala 3.)
> > Using `undefined` to represent `None` means that you cannot tell the difference between `None` and `Some(None)`
>
> I don't know where you get the impression, of course they are different in ReScript.
I get that impression from the document linked above, which says that `None` is represented as `undefined` and `Some(x)` is represented as `x`, so `Some(None)` must be represented as `undefined` as well. Oh and `()` too. Do at run-time you can't tell which is which.
> One thing missed is that ReScript compiler may be 100 times faster than Scala.js (I am not kidding)
Yes, I believe that's true. It is often mentioned as the biggest weakness is Scala, by advocates and detractors alike.