logoalt Hacker News

sysguesttoday at 8:31 AM1 replyview on HN

idk maybe java should adopt something similar to rust's "edition"?


Replies

gf000today at 8:51 AM

Correct me if I'm wrong, but Rust editions are a source code-level feature. So given you have the source code of newer and older rust code, you can compile them together.

That's materially distinct from Java's model of basically dynamic loading already compiled class files. Though class files do have "editions", and there are extra code to deal with different versions. But still, it should be possible to e.g. send a new value class to an old library's class that has never heard of them, and that should just work.

show 1 reply