News for hackers. Stuff that matters.
Re:JVM/Java: Null-Restricted and Nullable Types by xxs on Friday August 02, 2024 @06:09AM (#41137507)
>Java is not an innovative language

Most of the innovation when it comes to concurrency, garbage collection, JIT did come from Java. Syntax - that's more of an opinion/preference.

My gripe with yet another "improvement" of the language is still the lack of headerless objects (aka value classes) - JEP 401[0]

[0]: https://bugs.openjdk.org/browse/JDK-8251554

Re:JVM/Java: Null-Restricted and Nullable Types by bkail on Friday August 02, 2024 @08:40AM (#41138361)
nullability is directly related to the value classes effort (the top article mentions value classes, and the JEP you linked mentions nullability): in order to get the most benefit out of value classes, you need some way to express guaranteed non-nullability to avoid needing to encode null (imagine Point[] vs Point![]): https://cr.openjdk.org/~jrose/values/flattened-values.html#i...
Re:JVM/Java: Null-Restricted and Nullable Types by xxs on Friday August 02, 2024 @10:35AM (#41139100)
'Value' classes would be useful in arrays only + some version of direct buffer mapping. All other cases are pretty uninteresting when it comes to performance or memory layouts.