<div dir="ltr"><span class="Apple-style-span" style="font-size: small;">I agree that making every statement also an expression has merits, as does FP. However, you're handwaving about how this fits into python. The scope of an if is defined syntactically by indentation. Your proposal changes that in some way that I can't quite tell. Is it that you can put a single expression between the if and the else? Or something else? When would line breaks be optional where they are now required?</span><div>

<span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;">Simply saying "make everything an expression" is insufficient. Saying "it's just lifting a restriction" is also insufficient. In many languages there are restrictions on using the + operators with non-numbers. Why can't we just remove that restriction? Well, we have to define the precise semantics in order to do that, e.g., what does []+{} mean?</span></div>

<div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;">You said that the value of a for loop would have the value [] if it didn't include yield, i.e., </span></div>
<div><span class="Apple-style-span" style="font-size: small;">    for x in y: foo(x)<br></span></div><div><span class="Apple-style-span" style="font-size: small;">evaluates to [] while you said</span></div><div><span class="Apple-style-span" style="font-size: small;">    if x: foo(x) else: foo(0)</span></div>
<div><span class="Apple-style-span" style="font-size: small;">evaluates to foo(something). That seems inconsistent. Is that inconsistency a good thing? For that matter, why return a list rather than () or an empty generator? [[As an aside: why can't I write {foo(x) for x in y} which is the equivalent of doing d[x] = foo(x) for all x. I've just written the equivalent loop several times recently.]]</span></div>
<div><br></div><div>To answer these questions, the right thing to do is to write a list of exactly what new syntax and semantics you are proposing. I'm not saying that I (or anyone else) will agree with what you propose but I certainly can't agree with the vague proposal you've made so far.</div>
<div><br></div><div><span class="Apple-style-span" style="font-size: small;">--- Bruce</span></div></div>