<div dir="ltr">I hope Python never has to go there. It's a tooling nightmare.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 4, 2018 at 2:11 PM, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, May 4, 2018 at 1:53 PM, Tim Peters <<a href="mailto:tim.peters@gmail.com">tim.peters@gmail.com</a>> wrote:<br>
> [Tim]<br>
>>> ...<br>
>>> It's no longer the case that Python avoided that entirely, since<br>
>>> "async def", "async for", and "async with" statements were added<br>
>>> _without_ making "async" a new reserved word.  It may require pain in<br>
>>> the parser, but it's often doable anyway.  At this stage in Python's<br>
>>> life, adding new _reserved_ words "should be" an extremely high bar -<br>
>>> but adding new non-reserved keywords (like "async") should be a much<br>
>>> lower bar.<br>
><br>
> [Guido]<br>
>> Do note that this was a temporary solution. In 3.5 we introduced this hack.<br>
>> In 3.6, other uses of `async` and `await` became deprecated (though you'd<br>
>> have to use `python -Wall` to get a warning). In 3.7, it's a syntax error.<br>
><br>
> See my "that deserves more thought" at the start, but wrt future cases<br>
> then ;-)  In 3.5 and 3.6, "everything just works" for everyone.  In<br>
> 3.7 the implementation gets churned again, to go out of its way to<br>
> break the handful of code using "async" as an identifier.  It's<br>
> obvious who that hurts, but who does that really benefit?<br>
><br>
> My experience with Fortran convinces me nobody would _actually_ be<br>
> confused even if they wrote code like:<br>
><br>
> async def frobnicate(async=True):<br>
>     if async:<br>
>         async with ...<br>
<br>
</span>IIUC, Javascript has also gone all-in on contextual keywords. The<br>
realities of browser deployment mean they simply cannot have flag days<br>
or break old code, ever, meaning that contextual keywords are really<br>
the only kind they can add at all. So their async/await uses the same<br>
kind of trick that Python 3.5 did, and I believe they plan to keep it<br>
that way forever.<br>
<br>
FWIW.<br>
<span class="HOEnZb"><font color="#888888"><br>
-n<br>
<br>
-- <br>
Nathaniel J. Smith -- <a href="https://vorpus.org" rel="noreferrer" target="_blank">https://vorpus.org</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div></div>