From: Eric Mahurin Date: 2007-05-23T04:28:45+09:00 Subject: Re: How to adopt "Python Style" indentation for Ruby On 5/22/07, Brad Phelan wrote: > I am not concerned really either way with the indentation thingie. I > don't think that is the main difference between python and Ruby. In my > op' the fact that Python does not do generic blocks is the main arguing > point. I am not sure why the indentation issue raises so much heat. > > What interests me about this thread is that, if you wish, > you can transparently add your own dialect to ruby by overloading > require. I've done the same thing before to load ERB files as if > they were real ruby files on the path. I jumped in at the challenge > of the OP as to whether transparent preprocessing is possible. The fact > that it is and so simply is a nice sign of the power of the ruby language. Agreed. Indentation vs. other ways of delimiting code blocks is just a surface issue. For the most part, it is just a preference thing. The lack of a real lambda (and its verbose syntax compared to ruby blocks) in python is a much bigger issue. I still think python's crippling of the lambda has to do with the indentation thing. The way they did it, indented code blocks ("suites") are only part of statements (not more generic expressions). Since a lambda is an expression (probably used in an enclosing statment), it doesn't get to have generic code blocks. With some rework, blocks delimited by indentation don't have to be so limited.