Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 60308f1

Browse files
committed
add a few notes in the intro
1 parent c11f737 commit 60308f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ <h1>Scope</h1>
2929

3030
<p>For the syntax, we use the `?.` token, with a lookahead at the level of the lexical grammar that allows to discriminate between `a?.b` (optional chaining) and `a?.3:0` (conditional operator, whose meaning cannot be changed due to backward compatibility constraints).</p>
3131

32+
<p>The definitive syntax is still an open issue at this point.<p>
33+
3234
<p>An <a href="https://claudepache.github.io/es-optional-chaining/">early version of this proposal</a> used a Nil reference to express short-circuiting. This one is based on syntax only.</p>
3335

3436
<p>Normative additions are marked <ins>like this</ins>. In order to avoid distraction, we don’t mark mere editorial amendments.</p>
@@ -39,6 +41,11 @@ <h1>Scope</h1>
3941
<li>In new content, adoption of calling convention for directed operations of PR <a href="https://github.com/tc39/ecma262/pull/955">tc39/ecma262##955</a>.</li>
4042
</ul>
4143

44+
<p>The following features may not be evident at a cursory read:</p>
45+
<ul>
46+
<li>Optional chaining is forbidden in write contexts such as `a?.b = c`. This is handled by defining properly the IsValidSimpleAssignmentTarget static semantics rule (<emu-xref href="#sec-static-semantics-static-semantics-isvalidsimpleassignmenttarget"></emu-xref>).</li>
47+
<li>Optional deletion as in: `delete a ?.b` is supported. There is no change needed in Section <emu-xref href="#sec-delete-operator">The delete Operator</emu-xref>.</li>
48+
</ul>
4249
</emu-clause>
4350

4451

0 commit comments

Comments
 (0)