--00163662e65c753b43046a5cfd14
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Wed, May 20, 2009 at 1:10 PM, J Haas <Myrdred / gmail.com> wrote:

> I still have a tough time understanding this objection. What I'm
> essentially proposing is that at least in the case of code blocks that
> start with a colon, a de-dent takes the place of an end.  Given that, I
> just don't see what it is that could be done without end that couldn't
> be done without dedenting.


I already responded to this.  I guess you didn't see it.  There are several
types of statements which contain multiple indent blocks (and thus multiple
dedent tokens).  These would include if statements:

if foo
  blah
elsif bar
  blah2
else
  baz

Begin statements (ala try/catch in Python)

begin
  somecode
  morecode
rescue FooError
  some_rescue_action
rescue BarError
  another_rescue_action
ensure
  something_gets_done

Case statements:

case foo
when bar
  do_something
when baz
  do_something_else

Each of these statements is an expression with multiple clauses.  How do you
tell when these expressions are complete?  Obviously a naive "dedent  nd
of expression" approach doesn't work in these cases.

These work in Python because Python has a special grammar for statements
which doesn't require a statement separator for any statements which have
indent blocks.  This doesn't work in a language where everything is an
expression, because all expressions must be treated the same and all
expressions must have an expression terminator (newline or semicolon)

-- 
Tony Arcieri
medioh.com

--00163662e65c753b43046a5cfd14--