From: Brian Candler Date: 2009-05-20T19:45:42+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) J Haas wrote: > I'm a bit of a Ruby Nuby ... > I have a proposal Funny how suggestions for radical changes mainly come from people who, by their own admission, have not used Ruby seriously in its current form. But I certainly don't hold this against anyone, because I was the same myself at first. Space-delimited syntax has its place: it works well for HAML, which I love. But I'd hate it for Ruby. I want to be able to disable blocks of code by wrapping them with if false ... end and generally throw code around without having to re-indent it (even though I *do* normally stick strongly to standard indentation). In practice, it's much less frequent that I comment out a block of HAML, say. There's one case where the current behaviour *does* trip me up, and that's in DSLs. For example: context "a test" do <<< setup do <<< @foo = Foo.new end should "be empty" do <<< assert @foo.empty? end end Miss one of the magic 'do's and you get an error later (perhaps much, much later, say at the end of the file). These can be hard to find; sometimes I resort to a binary chop. However if I happen to have ruby1.9 lying around I can run it through that, and it gives me warnings about where indentation is not as expected. But even then, this does not bug me as much as having Python syntax would. Of course, syntax in itself adds nothing to the functionality of the language, but people have extremely strong preferences. LISP programmers are strongly wedded to its syntax; Python programmers are strongly wedded to its syntax too. So if you like Python syntax (and that's more important to you than other language features), then program in Python. -- Posted via http://www.ruby-forum.com/.