From: James Britt Date: 2008-10-07T03:44:42+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? Frasier Mruby wrote: Why not adopt "Python Style" indentation for Ruby? Because that would bite a big one. > > I am fine to have "END" for class or methods. But for IF,WHILE, CASE, > FOR, etc., when there are many levels it often make me confused what the > matching part of the those "END"s are. Then don't do that. Seriously. Twisty conditionals is a code smell. (Having fought with deep hierarchies of YAML and HAML, the lack of an explicit "end" token doesn't really help in complex documents; in fact, it can be detriment. Sometimes explicit is better than implicit.) BTW, doesn't your code editor find the matching braces (or do/ends) for you? (If not, get a real editor. They're free.) > To enhance readability is probably one of ruby's design purpose and I > really hope some thing could be done earlier to make the "END" looks > prettier. I *rarely* run into Ruby code that is not readable. When I do, it's almost always for a reason (e.g. Camping source code, or some code golfing). The idea that coders need to be coerced into writing readable code is as flawed as that of the need for Java-style static typing to avoid bugs. It sounds good in blog posts and mailing lists, but lacks empirical evidence. -- James Britt www.happycamperstudios.com - Wicked Cool Coding www.jamesbritt.com - Playing with Better Toys www.ruby-doc.org - Ruby Help & Documentation www.rubystuff.com - The Ruby Store for Ruby Stuff