Let me correct a misunderstanding. JADEx was created as a Java superset language to strengthen Java’s insufficient null-related type system. In JADEx, Java’s reference types are assumed to be non-null by default, and through the nullability static analysis results provided by JADEx, developers can explicitly choose to mark types as nullable.
Because of this, there is no problem using null-safe access operators and the Elvis operator.
To summarize:
Java: All types are nullable; there is no non-null type. Therefore, Elvis operators and null-safe access operators cannot be used.
JADEx: Both nullable and non-null types exist. Therefore, Elvis operators and null-safe access operators can be used.
Good clarification, thank you. I guess it would still require some extra care when interfacing with plain Java libraries, but so does e.g. Kotlin. Cool implementation.
Let me correct a misunderstanding. JADEx was created as a Java superset language to strengthen Java’s insufficient null-related type system. In JADEx, Java’s reference types are assumed to be non-null by default, and through the nullability static analysis results provided by JADEx, developers can explicitly choose to mark types as nullable. Because of this, there is no problem using null-safe access operators and the Elvis operator.
To summarize:
Good clarification, thank you. I guess it would still require some extra care when interfacing with plain Java libraries, but so does e.g. Kotlin. Cool implementation.