From: "Wolfgang Nádasi-donner" Date: 2007-05-19T03:13:08+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? Chris Dew wrote: > As far as I can see, the 'end' keyword is 'repeating yourself' when > used with properly indented code. > > class Foo > > def bar(value) > if value < 7 > puts "hello" > else > puts "world" > end > end > > def foobar > puts "foobar" > end > > end > > could be > > class Foo > > def bar(value) > if value < 7 > puts "hello" > else > puts "world" > > def foobar > puts "foobar" The is one big disadvantage in Python's syntax. Things like... def bar(value); (value<7) ? (puts "hello") : (puts "world"); end ...are not possible in Python - and they are useful for the typical one-to-three-liners in support areas, where Ruby still has the chance to replace Perl - a chance that Python never had. I know that my example has nothing to do with documentation oriented software development, but this is not necessary for a broad range of small ad-hoc tools. Wolfgang Nádasi-Donner -- Posted via http://www.ruby-forum.com/.