docs
docs copied to clipboard
Consider whether to remove empty parens in Ruby snippets
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.
Eliding empty parens is very, very normal. The first style is quite unusual in Ruby.
I think it's not a high priority, but sounds like we should do it when there's time.
I agree, I'd remove the empty parentheses.