From: Tony Arcieri Date: 2009-06-04T02:56:25+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) --001636989635a48c60046b7560ec Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Jun 2, 2009 at 8:12 AM, Eleanor McHugh < eleanor@games-with-brains.com> wrote: > In particular Python developers newly acquainted with Ruby tend to > underestimate the difference between statement-oriented and > expression-oriented languages. In the former a statement is an isolated > entity whereas in the latter every expression returns a value, and therefore > it is thoroughly legitimate to treat that expression as a sub-expression. > Whilst I don't doubt that expression-based languages can be framed in a > manner that is compatible with significant indentation, in doing so they > still need to guarantee maintainability. Indeed! Python's statement structured grammar is essential to the way it implements significant indentation. What I find incredibly curious is people keep equating the solutions proposed to Python (which has mandatory statement-structured indentation) when in actuality they resemble the Haskell approach (optional indent blocks in lieu of delimiting tokens in a pure expression grammar) This is what I was trying to explain at the beginning of the thread (if you want significant indentation in Ruby look to Haskell, not Python), but few seemed to understand. The proposed solutions aren't "Pythonic", they're... Haskellish? Or whatever the proper term for that is. -- Tony Arcieri medioh.com --001636989635a48c60046b7560ec--