▲ | vips7L 2 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
>but at this point, the only big technical features that still put Kotlin over Java for me is the handling of nulls by the type system Soon (tm): https://openjdk.org/jeps/8303099 The one feature that keeps me in Java, albeit not popular, is checked exceptions. I far prefer checked errors over checked nulls if I have to make a choice. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | Defletter a day ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
While I am definitely impatiently waiting for null-restricted types, what I feel Java really needs overall is ergonomic handling syntax, notably: "safe calls" (https://kotlinlang.org/docs/null-safety.html#safe-call-opera...), "elvis operator" (https://kotlinlang.org/docs/null-safety.html#elvis-operator), and inline catching (https://ziglang.org/documentation/0.14.1/#catch). | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | ragnese 19 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
I'm with you when it comes to checked exceptions. I have several ranty comments on this site about how everyone has been wrong to cargo-cult hatred of the feature for the last decade or so. But, I'd still rather have safe/correct null type checking, because at the end of the day, I can always write MY code to return a Result/Try/Either type instead of throwing unchecked exceptions for expected business logic "failure" paths. |