For one example of something that wouldn't work with tabs (although not my original point, see the whitespace between `key:` and `key,` on line 66 here: https://github.com/rails/rails/blob/main/actionmailbox/app/c...
For an example closer to my original point, see line 13 here: https://github.com/heartcombo/devise/blob/master/app/control...
I've published plenty of gems and open source Ruby work and I choose how I write my code, thanks, and I couldn't care less what the "community" thinks about tabs vs spaces. The "community" believes all sorts of nonsense and if they don't like my code they can fork it and "fix" the tabs. That may sound a bit combative but I don't take well to being told I'm the nail that stands up too much.
My views on tabs changed based on something I read of Samuel Williams (it could be this[1] or this[2]) that was entirely reasonable (note his far more gentle rebuttal than mine with the key phrase being evidence based), and I'd consider him one of the top ruby devs.
As to the keywords example, I use tabs all the time with that style - what problem am I supposed to encounter?
To the other example with the array constructor sugar, I tried it with tabs, I didn't see a problem:
``` helpers = %w(resource scope_name resource_name signed_in_resource resource_class resource_params devise_mapping)
helpers.each do |h| puts h end
$ ruby test.rb resource scope_name resource_name signed_in_resource resource_class resource_params devise_mapping ```
Apologies if the HN markdown sytax means this get mangled, no idea if it'll take fenced code blocks but you get my drift.
[1] https://github.com/ioquatix/universal-style-guide#indentatio...
[2] https://github.com/ioquatix/rack-freeze/issues/2#issuecommen...
Edit: It did get mangled :/ there's a newline and then plenty of tabs in there. Worked like a charm.
Further up it suggests "Don’t use several empty lines in a row." I put two lines between every method and it makes a language where every block ends with `end` far more easy to grok just from the shape.
It seems I won't be using all of their suggestions.
Bikeshedding, on the other hand, is taking a contrarian stance and deliberately arguing over stuff that really doesn't matter so that we spend time and energy arguing over that instead of over the code itself and what it's trying to achieve...
Yes, and pointless, all the examples were readable.
> Bikeshedding, on the other hand, is taking a contrarian stance and deliberately arguing over stuff that really doesn't matter
Imagine thinking that using tabs is a contrarian stance! I remember when being a rubyist was seen as being able to think for yourself. Times have changed.
def send_mail(source)
TABMailer.deliver(to: 'bob@example.com',
TAB from: 'us@example.com',
TAB subject: 'Important message',
TAB body: source.text)
end
Here, TAB has a width of three but of course the alignment would stay put even if it were wider or narrower.