From: Patrick Bennett Date: 2005-03-23T07:34:51+09:00 Subject: Re: Any guides for good coding in Ruby? Martin Ankerl wrote: >> I try to follow the style that is predominant in the Ruby parts of the >> Ruby source. Also, see: > > > I also do this, but there is one thing I cannot stand: every ruby lib > uses 2 spaces for indentation! IMHO it should be tabs, and *only* > tabs. This is much better, because in almost every editor it is > possible to set the tab width to whatever one likes. I hate 2 spaced > sourcecode, because I usually set one tab == 8 spaces, and use a > non-fixed font. > I dislike 2 spaces as well, but tabs are worse. It's *extremely* and I mean *extremely* rare for me to see a source file that uses tabs correctly. Tabs can *never* be used for anything other than indenting the first non-tab character on a line. That's it. As soon as they're used anywhere else on a line following non-tab characters to 'line up' code, then you've broken the ability for other users to use different tab settings and view your code the same way. The *only* way of assuring a consistent representation of source code is to use spaces and only spaces for indentation and column alignment. Modern editors make using spaces for tabs a non-issue anyway. Patrick Bennett