From: Eleanor McHugh Date: 2009-06-02T23:12:54+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) On 2 Jun 2009, at 06:20, Andy F wrote: > +1: new to Ruby and the list, so hope I'm not too rude in saying I'm > not impressed with some of the attitudes of 'piss off and use a > different language'. Everything's discussable! I'm not going to defend any 'piss off' attitude that may be inferred from some responses to this discussion, but do bear in mind that on any mailing list there are discussion topics which have been done to death in the past and that when they recur the posters responsible will get short shrift. It's also incredibly rude for someone to make their first post to a mailing list with something along the lines of "I'm new to this and think it's really cool, but you're all dumb because..." which whilst it isn't a fair characterisation of the original post in this thread does sum up how some people will have perceived it. Were an established poster to raise such a topic, having already demonstrated that they understand the trade-offs in the design of Ruby, the reaction would be very different - but then again the original post itself would probably have been phrased very differently as well. As to this particular topic. Outside the Python and Haskell communities I've seen very little hunger for significant indentation, and the benefits are hard to demonstrate as suitably compelling to outweigh all of the other changes people would like to see in their language of choice. In the case of the Ruby community the main hunger seems to be for ever-more-powerful meta-programming techniques and extension of the higher order functionals that so much of our code comprises of. In particular Python developers newly acquainted with Ruby tend to underestimate the difference between statement-oriented and expression- oriented languages. In the former a statement is an isolated entity whereas in the latter every expression returns a value, and therefore it is thoroughly legitimate to treat that expression as a sub- expression. Whilst I don't doubt that expression-based languages can be framed in a manner that is compatible with significant indentation, in doing so they still need to guarantee maintainability. Our penchant for a certain variety of meta-programming also makes me uneasy about significant indentation and whilst that unease may be misplaced I'm sure it's not an isolated phenomenon. The community would need to be certain that a change such as significant indentation didn't undermine either the fundamental ability to use those techniques nor their maintainability, and in hindsight I think a lot of the posts opposing such a change - even as an optional feature - reflect that. Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason