from Hacker News

C# is getting “?.”, sometimes called the Safe Navigation Operator

by mendicant on 2/26/14, 6:03 PM with 10 comments

  • by mcv on 2/27/14, 10:47 AM

    Great news. The ?. operator in Groovy greatly reduces boilerplate code and improves readability and maintainability. No layers of null pointer checks that are all basically the same and getting in the way of what you actually want to do.

    And in those cases where you still need specific behaviour based on which object is null, you can still use the . operator with traditional null pointer checks.

  • by mendicant on 2/26/14, 6:05 PM

    The question I have about this: Does making it easy to do parent?.child?.grandchild?.property help or hinder the software development process in the long term?