[Python-ideas] Statements vs Expressions... why?

Adam Olsen rhamph at gmail.com
Fri Sep 12 22:52:52 CEST 2008


On Fri, Sep 12, 2008 at 2:34 PM, Cliff Wells <cliff at develix.com> wrote:
> On Fri, 2008-09-12 at 14:03 -0400, Mike Meyer wrote:
>> Maintaining consistency is far more important than limiting size, and
>> is why most proposals are rejected. I don't feel that any of the
>> recent changes have introduced inconsistencies in the language.
>
> Ah, but I do:
>
> if cond: block
>
> vs
>
> expr if cond
>
> Here we have two forms of the *very same* logical construction.  A
> programmer must select one or the other based on *context*. This is my
> definition of inconsistent (although it's roots lie in a deeper
> inconsistency, namely the distinction between expressions and
> statements).

By definition, anything more complex than a turing machine contains
these redundancies (which you call inconsistencies).  Clearly, we all
use languages with a great number of them, so your notion that they're
inherently bad is disproven.

Which isn't to say they're inherently good either.. they do have a
cost, increasing the mental load of the programmer.  That suggests
there's a tradeoff involved.  Asking about the tradeoffs would be a
much more productive discussion.


-- 
Adam Olsen, aka Rhamphoryncus



More information about the Python-ideas mailing list