2 ms·
Groovy had null (optional) chaining https://therealdanvega.com/blog/2013/08/20/groovys-null-safe-operator https://therealdanvega.com/blog/2013/08/20/groovys-nu
by _Codemonkeyism 8y ago
Groovy had null (optional) chaining
https://therealdanvega.com/blog/2013/08/20/groovys-null-safe-operator https://therealdanvega.com/blog/2013/08/20/groovys-null-safe...
- tasubotadas 8y agoand Kotlin https://kotlinlang.org/docs/reference/null-safety.html https://kotlinlang.org/docs/reference/null-safety.html
- vorg 8y agoIn Apache Groovy you need to write `a?.b?.c` for nullsafe chaining on both `b` and `c`. In the past, its project managers have discussed propagating nullsafety down the chain so you'd only need to write `a?.b.c` to make both `b` and `c` nullsafe, but they've never implemented it. Not sure if that's in Rust, Kotlin, C#, or Ruby, or in Groovy's Antlr 4 parser.