On Aug 1, 2005, at 2:51 PM, Adam P. Jenkins wrote:

> gabriele renzi wrote:
>
>> Lothar Scholz ha scritto:
>>
>>>
>>> gr> Ok, I admit that it's not a big deal, but what do people  
>>> think of this?
>>>
>>  >
>>  >
>>
>>> Sorry for being very rude, but this one is the one of the most  
>>> stupid and ugly idea
>>> i'have seen in the last weeks.
>>>
>>> It hides errors, reduces readability and just for the benefit to  
>>> save a few keystrokes ?
>>>
>> the rudeness it's ok, but I disagree that it reduces readability.
>> My main reason is that imho it actually improves it, but obviously  
>> it must be a personal opinion since we disagree on it.
>> OTOH I don't see which kind of errors it does hide.
>>
>
> Take your example:
>
> class Foo
>  def bar(x)
>   puts x
>  def baz
>   puts 'baz'
>  Const=:someconstant
> end
>
> With the existing syntax, this would unambigously be a syntax error  
> due to missing end keywords.   With your proposal, it could be  
> correct, or it could really be this (only indentation changed),  
> with the last two "end"s missing:
>
> class Foo
>   def bar(x)
>     puts x
>     def baz
>       puts 'baz'
>       Const=:someconstant
>     end
>
> or
>
> class Foo
>   def bar(x)
>     puts x
>     def baz
>       puts 'baz'
>       Const=:someconstant
>   end
>
> or
>
> class Foo
>   def bar(x)
>     puts x
>     def baz
>       puts 'baz'
>   Const=:someconstant
> end
>
> or various other indentation permutations.  In short, without  
> significant whitespace, the meaning of the code is now ambiguous.   
> This is the problem with Python's significant whitespace: if you  
> accidentally re-indent something, it's impossible to just highlight  
> the code and tell the editor to re-format, because there is  
> literally no way for the editor to tell what was intended.
>
>

You don't need significant whitespace. What you do need is for nested  
defs to be illegal.
That's how ocaml works, not with significant whitespace. (At least as  
far as stament terminators are concerned)