Im working in a C++ project now and i wish i could have some C++ features in Java.
It’s nice to have sinonims of types using typedef . This is almost essential when working with templates.
Simplified constructor syntax: Vector x(1,2,3); instead of Vector x = new Vector(1,2,3);
Structured primitive data. Its a pain not having this is Java. Syntax would be simply:
@primitive class Vector { float x; float y }
Defines a final class whose methods are all final if exist.
No arrays bound checks: @nocheck int[] x
Sure there would be problems but the Java VM could have an option to run some classes in unsafe mode by setting a security policy for these classes.
Operator overloading: Vector x,y; x * y instead of x.multiply(y). It’s dumb to use the word multiply or even worst mul if we can and should use the * operator.

