News for hackers. Stuff that matters.
Re:JVM/Java: Null-Restricted and Nullable Types by jeltz on Friday August 02, 2024 @07:23AM (#41137892)
Yeah, the second not being an compile error allows for legacy code to call functions with notnull arguments but I do not think that is necessarily a good thing. Hard to say without using it in practice though.
Re:JVM/Java: Null-Restricted and Nullable Types by vbezhenar on Friday August 02, 2024 @08:34AM (#41138332)
Compiler will insert null checks in the function invocation. It's not a problem. And if you can't gradually migrate old code to null types, it means that most projects will never utilize those types.
Re:JVM/Java: Null-Restricted and Nullable Types by jeltz on Friday August 02, 2024 @11:46AM (#41139837)
Yeah, the more I think about it the more O agree with the design even if it surprised me at first.