Allow new language features on older version targets?

Dalibor Topic dalibor.topic at oracle.com
Tue Oct 12 15:24:37 UTC 2021


On 12.10.2021 10:14, Glavo wrote:
> This pain is not necessary. Although some language features of Java
> require the cooperation of JVM and standard library, e.g. Record, but
> this is not necessary for more features. At present, we can specify
> the source version and target version respectively, but we can't make
> the source version higher than the target version. I think this
> artificial additional restriction can be removed after careful
> consideration, so that more developers can enjoy the improvement of
> expression ability brought by Java's new language features.

Unfortunately, it's not an artificial restriction.

Java SE 8 is already specified, i.e. it was done in 2014. Any further 
changes to its specification would require a maintenance release of the 
specification.

But new language features are not in scope for maintenance releases:

"Changes appropriate for a Maintenance Release include bug-fixes, 
clarifications of the Specification, changes to the implementation of 
existing APIs, and implementation-specific enhancements." per JCP 2.11, 
which is in use for Java SE 8.

So there is no path forward where a revised Java SE 8 with new language 
features would be possible.

cheers,
dalibor topic
-- 
<http://www.oracle.com> Dalibor Topic
Consulting Product Manager
Phone: +494089091214 <tel:+494089091214>, Mobile: +491737185961
<tel:+491737185961>, Video: dalibor.topic at oracle.com
<sip:dalibor.topic at oracle.com>

Oracle Global Services Germany GmbH
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRB 246209
Geschäftsführer: Ralf Herrmann



More information about the jdk-dev mailing list