From: Trans Date: 2007-05-19T07:41:46+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? On May 18, 5:22 pm, Sven Suska wrote: > Eric Mahurin schrieb: > > > You might consider something like this as an alternative block syntax. > > Maybe a ":" followed by a newline (and extra indentation) would start > > this style. I'm not sure of a clean way to handle arguments though. > > What about another syntax: > Putting a special character at the beginning of every line that is > governed by significant whitespace. > Thes would cause no problems with normal Ruby syntax, > but would provide a way to use significant indentation if one really > wants to. > > If "~" were that special character, it would look like that: > ~ 5.times do |n| > ~ n.times do > ~ print n > ~ puts I can't count how many times I've forgotten "do". Sometimes I have wished a colon could "induce" the block: 5.times |n|: n.times: print n puts But I don't think a line prefix is worth the trouble. T.