docs icon indicating copy to clipboard operation
docs copied to clipboard

Consider whether to remove empty parens in Ruby snippets

Open deontologician opened this issue 9 years ago • 3 comments

Currently we use empty parens in Ruby snippets in the docs, a'la:

r.table('foo').max()

It seems to be common style in Ruby to elide empty parens like:

r.table('foo').max

ping @mlucy @mglukhovsky @gchpaco. If eliding the empty parens is pretty universal in Ruby code, I think we should do it. But if it's a "some people do, some people don't" then it's not worth bothering since most Ruby devs will be used to seeing empty parens regularly and it won't look off to them.

Note I'm just talking about eliding empty parens, not all parens in Ruby snippets.

deontologician avatar Mar 19 '15 22:03 deontologician

Eliding empty parens is very, very normal. The first style is quite unusual in Ruby.

gchpaco avatar Mar 19 '15 23:03 gchpaco

I think it's not a high priority, but sounds like we should do it when there's time.

danielmewes avatar Mar 19 '15 23:03 danielmewes

I agree, I'd remove the empty parentheses.

mlucy avatar Mar 20 '15 00:03 mlucy