Suppose you are stuck working on a > 500,000 loc java codebase. This forces a "JVM language" in order to have nice interop. Which language would you pick to have as close of a type system to Rust as possible? Currently considering Kotlin Scala, but interested in hearing other opinions.
The JVM doesn't have custom value types (yet) nor any kind of borrow checking, so basically none of them have what I'd consider Rust's special sauce.
As such, just use whatever it's already using. If you're interop'ing with classes-everywhere code, you're going to be stuck in that kind of model anyway, and probably can't usefully do anything else.
I completely agree.
Scala has structs, sorta-enums, sorta-pattern-matching-on-enums, which is better than plain Java. So it's like "halfway there" in terms of type system.
There are Frege and Eta, which describe themselves as a "Haskell for the JVM", but they are very niche.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.