www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - OT: (Java) Null-Restricted and Nullable Types (Preview)

reply ryuukk_ <ryuukk.dev gmail.com> writes:
That's funny to see Java being modernized before D

Pattern matching, and now nullable types with the introduction of 
'?' and '!'

https://bugs.openjdk.org/browse/JDK-8303099


If you know DMD, submit your PR today
Aug 02
parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 02/08/2024 10:26 PM, ryuukk_ wrote:
 That's funny to see Java being modernized before D
 
 Pattern matching, and now nullable types with the introduction of '?' 
 and '!'
 
 https://bugs.openjdk.org/browse/JDK-8303099
 
 
 If you know DMD, submit your PR today
It is not exactly surprising that Java is getting nullability type state representation in the language. Other JVM languages have had it for around 15 years and it appears to be useful information for optimization.
Aug 02