From: Eric Mahurin Date: 2007-05-19T01:58:40+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? On 5/18/07, Austin Ziegler wrote: > On 5/18/07, Eric Mahurin wrote: > > On 5/18/07, Yukihiro Matsumoto wrote: > > I've picked up on python in the last couple months and like the > > indentation. In addition to forced readablity, I find another > > practical benefit is that it eliminates hard to track down syntax > > errors due to matching {}, begin/end, etc. In ruby, C, perl, etc > > these errors can be painful to track down in a large file with lots of > > blocks within blocks. > > Scope indicated by whitespace is an indication, IMO, that the compiler > thinks that it knows better than you do. > > Always a mistake. > > I want a programming language that works how I do; I don't want to > have to work how a stupid programming language requires it. > > (I sometimes put debug statements flush left so that it's a simple > /^p to search for them. Can't do that with scope controlled by > whitespace. Dumb, dumb, dumb, dumb.) That is the exact same case I find the indentation thing gets in the way. I had to change my way of putting in print debug statements (same as yours). Every language makes you change your ways a bit. Of course python's debug facilities (pdb) are much better than ruby's so I don't do print debugging as much. I would rather have multiple ways to specify blocks: * {}'s * indentation * in-line (single statement/expression) BTW, python's lambda sucks! You can't put generic code in there - it must be a single expression. I think it has to do with the indentation thing. Only statements can have code blocks (using indentation) and a lambda is an expression. I don't like the clear separation of statements and expressions that python has. I think it all comes back to the indentation thing. They didn't do it right. Sounds like Haskell did (but I have no experience with it).