From: Ben Giddings Date: 2005-03-23T08:17:53+09:00 Subject: Re: Any guides for good coding in Ruby? [OT] tabs vs. spaces 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. Yay! Let's start a tabs vs. spaces flame war!! My view? Tabs should never, ever be used in a file. (Ever) Can you have a source code file without spaces? I doubt it. Can you have a file without tabs? Certainly. Is mixing the two the main problem? Yup. Use only spaces. It's funny though. I think this eternal flame war is related to the other eternal flame war: vi vs. emacs. In Emacs, the 'tab' button is most often bound to 'indent-command'. This and 'indent-region' makes it really easy to use spaces for indentation, and to adjust/fix someone else's indentation when it's bad. On the other hand, I think vi makes it much harder to use spaces for indentation, so tabs seem more attractive. Anyhow, before throwing in your views, at least read up on other people's arguments. :) http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%22tabs%20vs%20spaces%22 Ben