Frasier Mruby wrote:
> Dear Mats,
>
> I am kind of new to ruby and like it after looking python first.  As 
> some other people said, my only major complaint is it's many "END". 
> Among java/c/C++/python, the "END" keep reminding me the inconvenience 
> of it during coding ruby.  I like ruby because it's easy to learn, and 
> to read. It's designed for be friends of programmers.  But I feel the 
> "END" may have a negative role to ruby's purpose or attraction.
>   

Like any new language, it takes some time to adjust your eyes and fingers.

> I am fine to have "END" for class or methods. But for IF,WHILE, CASE, 
> FOR, etc., when there are many levels it often make me confused what the 
> matching part of the those "END"s are.
>   

None of your suggestions seem to address this issue. Matching 'end' is 
no harder than matching '}'. If you get confused, add documentation like 
some people do:

end#if
end#while
end#class

> I understand and agree your comment that ruby had better to have 
> something to close the code block. But I sincerely hope you could come 
> up something else to replace the "END".
>
> My first thought to use brace "{...}" to replace "END" since it's a 
> popular convention.
>   

But then it looks like C/Java.

> I suggest to use only the "do...end" to formalize the blocks, brace {} 
> will be stopped to be used. It seems to me it's a waste of symbols to 
> have two ways to represent blocks, which may not be the most frequently 
> used.  Or consider to use use:
>  "/* */", "|...|", "<...>", "[...]" , "(...)", "((...))", , "//...//", " 
> :...: ", " '...' ", " `...` " for blocks.
>
> To enhance readability is probably one of ruby's design purpose and I 
> really hope some thing could be done earlier to make the "END" looks 
> prettier.
>   

I think 'end' looks fine, personally. I used to use curly braces all the 
time, but now I find myself using them as little as possible. do/end 
seems nicer and I don't get them confused with hashes that way.

Besides, I enjoy the current look for conditionals. Given your later 
example, I prefer to see

if b is not nil

def bar b

than

if b is not nil {

def bar b {

Especially if it's going to lead to arguments about where that '{' 
should go. Same line? Next line? Next line indented? I don't want C. I 
don't want Java. I don't want parentheses around my conditionals when 
they aren't needed. I don't want to have to use my shift key more than 
necessary. I really don't see the problem with the current syntax. I 
respect your opinion but definitely do not agree.

-Justin