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

Cliff Wells cliff at develix.com
Fri Sep 12 16:41:20 CEST 2008

On Fri, 2008-09-12 at 02:40 -0400, Scott Dial wrote:
> Cliff Wells wrote:
> >> That in turn will force you to think about many of the details that
> >> you're currently brushing away as irrelevant -- and you'll find that
> >> they are actually highly relevant.
> > 
> > I'm not brushing them away as irrelevant, I'm setting them aside until
> > it's decided that it's even worth pursuing.  I don't know about you, but
> > I don't bother arguing with my wife about the color of a new cars until
> > we're certain we need to buy one. 
> I'm sorry, but the points people are bringing up are not bikeshedding.
> They are very real points that are more analogous to whether the car has
> wheels or flies on pixie dust.

Fair enough.  I simply think there's a larger philosophical issue: is
the potential for deeply nested code a greater concern than an
ever-expanding suite of special-case constructs?  That needs to be
agreed on before deciding on a specific way of addressing it.

Even if we agreed on the larger issue I've forwarded, what I'm
suggesting may not be the only way of addressing it.

>  I'm sorry, but you can't cast aside the
> subtleties of turning statements into expressions as bikeshedding
> arguments. Many of the people who gave you very genuine feedback pointed
> out particularly difficult to rectify problems (like how exactly do you
> notate a suite if you eliminate the required indent tokens?) 

To be clear, I don't suggest eliminating the required indentation for
multi-line blocks (although it seems you could intentionally dodge it
through judicious use of the ';' operator and parentheses, much like you
can with expressions and operators today).

> and your
> response to them is that they are missing the point.. You want to change
> the language, the syntax of that change is *exactly* the point.

Well, I'll take the blame for not spending more time separating out the
fact that I'm presenting both a problem and a potential solution which
has led to a conflation of the two to some degree.  I think the solution
I've presented helps demonstrate that there *is* a problem and so I find
it difficult to present the problem in the solution's absence.

As I mentioned in my first post, the current situation has arisen
because of a philosophy ("flat is better than nested").  This seems a
valid position, but I'm arguing that it has proven over time to have as
many pitfalls (in terms of complexity) as the problem it seeks to avoid.

Hopefully that makes it more clear why I'm trying to get people to see
(and hopefully agree) that there's a problem before bickering over the
details of its solution.


More information about the Python-ideas mailing list