2 ms·
Anyone know why Ruby is 100% for 2 spaces? That seems impossible. Even Go isn't that consistent and it has gofmt which seemingly everyone uses.
by SwellJoe 11y ago
Anyone know why Ruby is 100% for 2 spaces? That seems impossible. Even Go isn't that consistent and it has gofmt which seemingly everyone uses.
- gwintrob 11y agoThe GitHub style guide agrees: https://github.com/styleguide/ruby https://github.com/styleguide/ruby
- Macha 11y agoHere's the thing though, Python has PEP-8, which is _the_ style guide for Python, and even that is only 91% 4-spaces. So that's pretty much the upper limit on the impact of a style guide on a language's conventions, I would imagine. Go gets even higher, but only because there's an expectation of gofmt usage which converts spaces to tabs.
- bhuga 11y agoI was taken aback by this as well. The Ruby community lets opinions be strong, and tends to converge on 'standards,' so I expected 2 spaces to be a strong winner. But beating out go, which ships with `go fmt`, is a pretty impressive community-wide commitment.