3 ms·
Would be cool if Java got this feature, explicit optionality at a language level a la T? is an enormous developer QoL in Kotlin and Typescript in my experience.
by dtech 2y ago
Would be cool if Java got this feature, explicit optionality at a language level a la T? is an enormous developer QoL in Kotlin and Typescript in my experience. In Java there's tools like NullAway [1] but they're a hassle.
Language-level support is leagues better than Optional/Maybe in my experience too because it keeps the code focused on the actual logic instead of putting everything in a map/flatMap railway.
[1] https://github.com/uber/NullAway https://github.com/uber/NullAway
- j16sdiz 2y agoBreaking 30+ years of source compatibility? Why? Why don't just use any JVM languages?
- twic 2y agoThis change would not break any source compatibility.
- voidfunc 2y agoSome us actually work on real software with dozens or hundreds of other devs and not toys. We can't always just "use any JVM language".
- imtringued 2y agoI wish Oracle would just offer Java editions, where they break syntactical backwards compatiblity, but retain backwards compatibility on the bytecode level. Of course, 99% of the language should stay the same with most of the syntactical changes just getting rid of the annotation mess that proper Java would be.
- pjmlp 2y agoThat is already what guest languages offer, but then there is always the caveat that their subculture only sees the JVM as a bootstrapping tool for their little ecosystem.