Hacker News new | ask | show | jobs
by _Codemonkeyism 2706 days ago
Groovy had null (optional) chaining

https://therealdanvega.com/blog/2013/08/20/groovys-null-safe...

2 comments

In 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.