<div dir="ltr">The PEP combines ideas from several different languages. For example:<div><br></div><div>* Both Dart and C# have "x ?? y" and "x?.y".</div><div>* Dart has "x ??= y" and C# does not. </div><div>* C# has short circuit semantics for "?." and Dart does not. </div><div>* PHP has "??" but does not have "?."<br></div><div>* Etc.</div><div><br></div><div>Wikipedia lists a lot of other languages[1], but I don't have enough personal experience with any of them to cite them in the PEP. This is why I use the phrase "other mainstream languages" multiple times.</div><div><br></div><div>If you think the safe navigation operator isn't presented clearly, I am willing to improve it. Is there a particular example that you're struggling with? The simplest explanation is that it works the way you would want it too, e.g. in "foo?.bar.baz", we don't want semantics that could lead to looking up "baz" as an attribute of None. Therefore, if "foo?.bar" evaluates to None, then ".baz" is short circuited — that attribute is not looked up.</div><div><br></div><div>[1] <a href="https://en.wikipedia.org/wiki/Null_coalescing_operator#SQL" target="_blank">https://en.wikipedia.org/<wbr>wiki/Null_coalescing_operator#<wbr>SQL</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 31, 2016 at 12:33 PM, Paul Moore <span dir="ltr"><<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.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 31 October 2016 at 15:51, Mark E. Haase <<a href="mailto:mehaase@gmail.com">mehaase@gmail.com</a>> wrote:<br>
> Therefore, I have updated the PEP with the punctuation mentioned above, and<br>
> at this point the PEP can't go any farther. If the best spelling for this<br>
> new operator is unacceptable, then there's no getting around that. This PEP<br>
> should be rejected.<br>
<br>
</span>While I agree that there's little point arguing over spelling here -<br>
if the ? spelling is unacceptable we should just reject - I'm not sure<br>
that's the only sticking point remaining here. I still find the<br>
short-circuiting behaviour of ?. (and ?[) to be pretty confusing - and<br>
the fact that there's a long paragraph describing the behaviour, with<br>
lots of examples of the form "if you think that this example works<br>
like so, then you're wrong, and it actually does the following",<br>
suggests to me that I'm not going to be the only one struggling.<br>
Hopefully, the problem is simply the way the behaviour is presented,<br>
and a reworking of the description would make it all crystal clear -<br>
but it feels to me that there's some inherent complexity here that's<br>
an actual issue with the proposal.<br>
<br>
Having said that, it appears that the proposed behaviour is the same<br>
as in C# (can you just come out and say "C#", rather than hinting with<br>
the phrase "other popular languages" - if we're stealing the behaviour<br>
as is from C#, let's say so, and if not, can you include examples from<br>
more than one language?) Assuming that's the case, then the fact that<br>
it's not causing confusion to C# programmers is a definite point in<br>
its favour.<br>
<span class="HOEnZb"><font color="#888888"><br>
Paul<br>
</font></span></blockquote></div><br></div>