The Ruby Style Guide
11–20 of 48 posts
Re: The Ruby Style Guide
#1280 char line length in 2019?
Re: The Ruby Style Guide
#13Hard to swallow without any reasons written behind each decisions.
Re: The Ruby Style Guide
#14I made a comment on this thread[1] in 2014, and it was closed two days ago. I wondered why... guess this is why! 1: https://github.com/rubocop-hq/ruby-style-guide/issues/273
I blame Rust, and macros.
Re: The Ruby Style Guide
#15I made a comment on this thread[1] in 2014, and it was closed two days ago. I wondered why... guess this is why! 1: https://github.com/rubocop-hq/ruby-style-guide/issues/273
I don’t fully get your point. There is no official style guideline for Ruby.
Re: The Ruby Style Guide
#16Hard to swallow without any reasons written behind each decisions.
The Ruby Style Guide has been around for a long time now, this is just a nice update. The guide has received ample feedback and edits/additions over the years, with an emphasis on reaching a consensus amongst senior ruby developers and open source contributors. I believe that adding justifications or reasons for each guideline would make the guide harder to read and search. The way it is written now is succinct enoug…
Re: The Ruby Style Guide
#17Earlier quoted context omitted.
I don’t fully get your point. There is no official style guideline for Ruby.
I'm not sure what your point is either. Mine was "oh, there's a website now; they must have been reviewing old issues to prepare for the launch." There is no "official" style guide, you're 100% right, but I'm not sure what that has to do with this.
Re: The Ruby Style Guide
#18Earlier quoted context omitted.
I'm not sure what your point is either. Mine was "oh, there's a website now; they must have been reviewing old issues to prepare for the launch." There is no "official" style guide, you're 100% right, but I'm not sure what that has to do with this.
Oh, got you. I thought you were implying some conspiracy to kill conversation or something. Nvm.
Re: The Ruby Style Guide
#19Oh fun another style discussion! :-) My own taste is for a "book style": write the code like you see in good books. I agree with most of this guide, although I'm pretty loose and case-by-case in practice. I've gradually added rubocop to lots of my projects, but then I wind up disabling tons of the rules. I'm sad all the Ruby guides I've seen ban "and" and "or". I don't find them to be such an issue, and they are nice…
I generally prefer `&&` and `||` for purely aesthetic reasons; they're much taller characters, so I can easily see the division between clauses. `and` and `or` look too much like identifiers (even with keyword syntax highlighting), so my eyes tend to gloss over them at first glance.
Out of curiosity, was the use of `&` in "type & read" intentional to try to demonstrate your point? My preference is interestingly the opposite for natural language; using tall punctuation like that feels too obtrusive for me in the middle of what usually is a bunch of lowercase letters.