4 ms·
Rust editions? They work on per crate, rather than per file level though.
by KptMarchewa 4y ago
Rust editions? They work on per crate, rather than per file level though.
- pron 4y agoIn Java you set the language version per source file, and there are occasional and uncommon source incompatibilities, but it's still not worth it to introduce a common incompatibility (which isn't really the case here, anyway).
- KptMarchewa 4y agoThey still all compile to some set bytecode version, right?
- pron 4y agoThe target bytecode/standard library version can also be specified on a per-file basis (we have both -source and -target options). But while the VM can load a classfile of any version since the beginning of time, the javac compiler supports only a certain number of versions back in terms of source version and target version (e.g. you can't use a JDK 19 compiler to target JDK 7, but you can ask for the same language, API, and bytecode level as 15).