2

There is a terminology "safe navigation operator" in programming. https://en.wikipedia.org/wiki/Safe_navigation_operator

But "navigation" is a noun, why an adjective "navigational" is not used?

I think this question is on border of a programming question and an English question. If you guys think I should ask this question in Stack Overflow, I'll move to there.

  • 1
    Because it's the same that we call + the plus operator or the addition operator rather than the additional operator, I suppose. – Damkerng T. Jan 15 '17 at 11:48
  • 1
    It's a noun adjunct. In English, you can use a noun to modify another noun, like "race horse" or "apple tree" or "navigation operator". – stangdon Jan 15 '17 at 13:38
0

Because the underlying operator is called a

navigation operator

and a

safe navigation operator

is a navigation operator that has been made "safe" by the way it returns its argument values.

In programming languages where the navigation operator (e.g. ".") leads to an error if applied to a null object, the safe navigation operator stops the evaluation of a method/field chain and returns null as the value of the chain expression.

Why the underlying operator is not called a "navigational operator" is a different question.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.