From f6e87737e79553d05c2ef26645e1d41a63d395dd Mon Sep 17 00:00:00 2001 From: boyned//Kampfkarren Date: Mon, 8 Nov 2021 23:03:39 -0800 Subject: [PATCH] Try to be less confusing --- rfcs/syntax-safe-navigation-operator.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rfcs/syntax-safe-navigation-operator.md b/rfcs/syntax-safe-navigation-operator.md index dff9c9fe..5f520a82 100644 --- a/rfcs/syntax-safe-navigation-operator.md +++ b/rfcs/syntax-safe-navigation-operator.md @@ -77,9 +77,9 @@ Failing the nil-safety check early would make the entire expression nil, for ins The list of valid operators to follow the safe navigation operator would be: ```lua -dog?.name == if dog == nil then nil else dog.name -dog?.getName() == if dog == nil then nil else dog.getName() -dog?:getName(args) == if dog == nil then nil else dog:getName(args) +dog?.name --[[ is the same as ]] if dog == nil then nil else dog.name +dog?.getName() --[[ is the same as ]] if dog == nil then nil else dog.getName() +dog?:getName(args) --[[ is the same as ]] if dog == nil then nil else dog:getName(args) ``` When using safe navigation to call a function, the short circuiting will prevent the arguments from being evaluated in the case of nil.