From: Robert Dober Date: 2007-05-19T15:38:15+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? On 5/18/07, Trans wrote: > > > 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: That puzzles me, would you not forget the ":" then? Or do you have a lot of Python experience. Not that I think bad of the ":" syntax, just wondering. Robert > > 5.times |n|: > n.times: > print n > puts > > But I don't think a line prefix is worth the trouble. > > T. > > > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw