From: Rodrigo Rosenfeld Rosas Date: 2011-05-17T21:15:53+09:00 Subject: [ruby-core:36267] Re: Whitespace conventions? Em 17-05-2011 06:19, NARUSE, Yui escreveu: > 2011/5/17 Ryan Davis: >> On May 16, 2011, at 23:54 , NARUSE, Yui wrote: >> >>> 2011/5/17 Steve Klabnik: >>>> So, while working on some documentation, I've noticed that there's a lot of >>>> mismatched spaces and tabs in the standard library. Is there a real >>>> convention for this? Would a patch that converts everything to two spaces >>>> rather than tabs, and removes white spaces at the ends of lines be accepted? >>>> I'd imagine that being consistent is better than a patchwork of indentation. >>> If you use Emacs or Vim, I wrote a guide: >>> http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style >> I am disappointed that we can't just switch entirely to spaces. It seems so antiquated. >> >> That said, your URL suggests you wouldn't mind a sweeping commit for all the ruby code with tabs left. Would that be OK for Steve or me to do? > Why must we be converted to your expandtab religion? > Will you say the same thing when you contribute to GNU? Well, when we program in a language, there are usually conventions attached to it. When we use Java or Javascript, we usually write with CamelCase while in Ruby we are used to underscore_names. In the same way, we Rubyists are used to 2-space indenting, not tabbed ones. I think we could apply the same style to the C-code as well, as Rubysts are already used to it. Let me ask the inverse. Why to use both tabbed-indented and space-indented styles? What is the problem in converting tabs to spaces?