From: Chad Perrin Date: 2007-05-20T03:02:30+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? On Sun, May 20, 2007 at 12:05:06AM +0900, Brendan wrote: > On May 18, 4:23 am, Chris Dew wrote: > > ... > > with no reduction in meaning, yet 25% fewer lines of code. > > > > What are the reasons why this isn't used/implemented/liked? It would > > be a small change to the interpreter. Enabling meaningful indentation > > would only make 'end' optional, not invalid; backwards compatibility > > wouldn't be a problem. > > > > (I use both Ruby and Python. I think indentation is one of the few > > *language* features where Python leads Ruby.) > > I personally prefer that 'end' be in place, so that all ruby code is > readable. I personally believe there may be something wrong with a > syntax which sacrifices explicit readability (for everyone, not just > python programmers) for increased typing speed and the illusory gain > of 'fewer LOC'. This was one of the major reasons which convinced me > to use ruby instead of python. I, personally, don't have an argument on principle like that for my own preferences in this matter. I just like the fact that an "end" makes it look more complete to me. Reading Python code always makes me feel like my eyes are just going to trail off the right-hand edge of the page because the "shape" of the code never brings me back to the leftmost edge, the way code "should". When I look at Python code, and ponder the way it does things so differently from Ruby regarding delimiters and indentation (the same thing in Python), it seems to me that Python was created for people who write code in a particular mindset, and it's not a mindset I share when I'm writing code. I guess maybe some people, when writing code, think in footnote hierarchies, while others (like me) think in nested scopes. That's just an off-the-cuff hypothesis. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Larry Wall: "A script is what you give the actors. A program is what you give the audience."