For the most general case illustrating short-circuiting, the instruction:
is equivalent to:
if (a != null) a.b.c().d = e;
@alangpierce has found real-world usages of that form in CoffeeScript, some of them seem reasonable, including two-level deep chains a?.b.c = d
:
https://gist.github.com/alangpierce/34b7aa40cda51b0a089a44680bdfed7e
Should we include that? In particular, are the semantics clear enough? There are the following subcases:
a?.b = c
a?.b += c
, a?.b >>= c
, etc.a?.b++
, --a?.b
, etc.{ x: a?.b } = c
, [ a?.b ] = c
, etc.for (a?.b in c)
, for (a?.b of c)
stefnotch, himynameisdave, afshin-hoseini, harryadel, tjdavies and 38 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4