Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 08/19/2013
Components: Language
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: Final /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 5
See http://cfmlblog.adamcameron.me/2013/08/thinking-about-operators-in-cfml.html
This is best demonstrated with an example:
a = { b ={ c = { d = 1 } } }; writeOutput(a?.b?.c?.d); // 1 writeOutput(a?.e?.c?.d); // null writeOutput(a.e.c.d); // ERROR
So rather than erroring because a.e doesn't exist, it gracefully returns null. Nice. This saves a lot of sequential structKeyExists() calls, or (grim) an isDefined() call.
--
Adam
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3614459
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: