From: Brian Candler Date: 2008-10-08T04:35:26+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? Yukihiro Matsumoto wrote: > But I sometime want "end"-less single line structure (in normal > order), e.g. > > if foo then bar # pseudo syntax; you may require delimiters > > not > > bar if foo > > especially when I write very small code chunk. Not knowing what > syntax it should be. As an observation, I always found ruby's "then" to be a rather superfluous non-keyword; that is, if a == b then ... end if a == b ... same end if a == b then ...; end if a == b; ... same; end So a possible (but highly incompatible) approach would be for "then" to introduce a single-line block, e.g. if a == b then puts "hello"; puts "world" # end implied if a == b puts "hello" puts "world" end It could also be used, although less obviously, in other constructs: while !a.empty? then puts a.shift I'm not sure what 'then' followed immediately by newline should do. Anyway, this is just an idle thought, as it would break lots of things. -- Posted via http://www.ruby-forum.com/.