safe navigation operator

Hello, you have come here looking for the meaning of the word safe navigation operator. In DICTIOUS you will not only get to know all the dictionary meanings for the word safe navigation operator, but we will also tell you about its etymology, its characteristics and you will know how to say safe navigation operator in singular and plural. Everything you need to know about the word safe navigation operator you have here. The definition of the word safe navigation operator will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofsafe navigation operator, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

English

Noun

safe navigation operator (plural safe navigation operators)

  1. (programming) A binary operator that returns its second argument, unless the first argument is null, in which case it returns null; used to simplify code that would otherwise need multiple explicit checks for nullity.
    • 2009, Bashar Jawad, Groovy and Grails Recipes, page 57:
      One operator I haven't talked about yet is the safe navigation operator (?.). By preceding a dot with a question mark, you can safely navigate to methods or properties of an object even if that object is null.
    • 2015, Mert Caliskan, Kenan Sevindik, Beginning Spring, page 278:
      The safe navigation operator (?.) provides navigation on the nested properties without getting any exception when a null value is evaluated from any of the properties iterated.
    • 2017, Gary McLean Hall, Adaptive Code: Agile coding with design patterns and SOLID principles:
      C# 6 introduced a cascading nulls operator, also called the null-conditional operator and the safe navigation operator.