<div dir="ltr"><div dir="ltr"><div>Hi everyone,</div><div><br></div><div>This week, the notes from <span><span class="gmail-il">TC39</span></span>'s 80th meeting were published. Here is your regular digest.</div><div><br></div><div>One upcoming change to TC39 meetings: They will be more frequent and shorter. This might make these updates a bit overwhelming, so I am thinking of switching this to quarterly instead. The news repo will be updated as usual. <br></div><div><br></div><div><b>Important Links:<br></b></div><div>* Proposal Summaries and Comments:<span style="font-family:monospace"> <a href="https://github.com/codehag/TC39-news/blob/master/meetings/2021/tc39-01-2021.md">https://github.com/codehag/TC39-news/blob/master/meetings/2021/tc39-01-2021.md</a></span><br></div><div>* Complete Notes: <code><a href="https://github.com/tc39/notes/tree/master/meetings/2021-01">https://github.com/tc39/notes/tree/master/meetings/2021-01</a> <br><br></code></div><div><b>The quick version:</b></div><p>This meeting, the focus was in brand checking. We had a few proposals looking at the question of
"how do we know what this really is". In JavaScript, instanceof is spoofable. A non spoofable check
is referred to as a brand. A common example is <code>Array.isArray</code>. We discussed brand checks in a few
forms, including class brand checks, using private fields as a way of determining a brand,
Type.isType as a generic brand check, and brand checks on template strings.</p>
<p>On the ergonomics side, do expressions were raised once more. They now take two forms: Sync and async:</p>
<p>Sync do:</p>
<div class="gmail-highlight gmail-highlight-source-js"><pre><span class="gmail-pl-k">let</span> <span class="gmail-pl-s1">x</span> <span class="gmail-pl-c1">=</span> <span class="gmail-pl-s1">do</span><span class="gmail-pl-kos"></span> <span class="gmail-pl-kos">{</span>
<span class="gmail-pl-k">let</span> <span class="gmail-pl-s1">tmp</span> <span class="gmail-pl-c1">=</span> <span class="gmail-pl-en">f</span><span class="gmail-pl-kos">(</span><span class="gmail-pl-kos">)</span><span class="gmail-pl-kos">;</span>
<span class="gmail-pl-s1">tmp</span> * <span class="gmail-pl-s1">tmp</span> <span class="gmail-pl-c1">+</span> <span class="gmail-pl-c1">1</span>
<span class="gmail-pl-kos">}</span><span class="gmail-pl-kos">;</span></pre></div>
<p>Async Do:</p>
<div class="gmail-highlight gmail-highlight-source-js"><pre><span class="gmail-pl-k">async</span> <span class="gmail-pl-s1">do</span> <span class="gmail-pl-kos">{</span>
<span class="gmail-pl-k">await</span> <span class="gmail-pl-en">readFile</span><span class="gmail-pl-kos">(</span><span class="gmail-pl-s">'in.txt'</span><span class="gmail-pl-kos">)</span><span class="gmail-pl-kos">;</span>
<span class="gmail-pl-k">let</span> <span class="gmail-pl-s1">query</span> <span class="gmail-pl-c1">=</span> <span class="gmail-pl-k">await</span> <span class="gmail-pl-en">ask</span><span class="gmail-pl-kos">(</span><span class="gmail-pl-s">'???'</span><span class="gmail-pl-kos">)</span><span class="gmail-pl-kos">;</span>
<span class="gmail-pl-c">// etc</span>
<span class="gmail-pl-kos">}</span></pre></div>
<p>Finally, I presented a proposal to introduce deferred module evaluation. This would be a standard
form of "sync lazy module evaluation". Unlike dynamic import, the module is fetched eagerly, but
it's evaluation is deferred until it is used. The conversations is quite interesting and may lead to
an interesting concept that we could adopt later on, once we have moved to ESMs.</p><br><br><div id="gmail-m_7225233593238741504gmail-m_8696932926476568318m_-9196181771787415125m_2946424876330350684gmail-:xz"><div id="gmail-m_7225233593238741504gmail-m_8696932926476568318m_-9196181771787415125m_2946424876330350684gmail-:y0"><div dir="ltr"><div><b><b>Learning more:</b><br></b>If you are new to the standards world and want
to learn more about <span><span class="gmail-il">TC39</span></span>, you can take a look at the process document
[1], and this slide deck that I did to explain the process [2]. We have
also built a repository explaining how <span><span class="gmail-il">TC39</span></span> works [3]. <br><br>If you want a
Mozilla-specific take, I am doing a stream explaining how to read the
specification and how SpiderMonkey works [4]<b>. </b>You can follow SpiderMonkey news through our newsletter [5]. <br><b><br></b>
[1]: <a href="https://tc39.es/process-document/" target="_blank">https://<span><span class="gmail-il">tc39</span></span>.es/process-document/</a>
<br>[2]: <a href="https://docs.google.com/presentation/d/1q6pCJVwgYV19gbvNdLtwMnQ6vMZKdqZY-cQ6CE5yH8Y/edit#slide=id.gc6fa3c898_0_0" target="_blank">https://docs.google.com/presentation/d/1q6pCJVwgYV19gbvNdLtwMnQ6vMZKdqZY-cQ6CE5yH8Y/edit#slide=id.gc6fa3c898_0_0</a><br>
[3]: <a href="https://github.com/tc39/how-we-work" target="_blank">https://github.com/<span><span class="gmail-il">tc39</span></span>/how-we-work</a> <br>
[4]: <a href="https://hacks.mozilla.org/2020/06/compiler-compiler-working-on-a-javascript-engine/" target="_blank">https://hacks.mozilla.org/2020/06/compiler-compiler-working-on-a-javascript-engine/<br></a></div><div>[5]: <a href="https://mozilla-spidermonkey.github.io/blog/" target="_blank">https://mozilla-spidermonkey.github.io/blog/</a></div></div></div></div></div></div>