> ah! but is consistency a strength?

Context beats consistency every time. But if the context is
unimportant, then consistency is preferable to randomness.

Yeah!!

I'm saying that the context probably did matter in quite a few of the
choices. I know I've personally used all the different styles at
different times depending on the context.

It felt like, from looking through the code (and svn blame), that a
bunch of different people's styles had seeped into the codebase.
Perhaps now that there are so many core committers, some coding
standard could be set?

In some cases, (mainly routing), there is a bunch of whitespace to
help readability when there are a few similar statements (which is
clear and disambiguating) like

case foo
something  : do_thing(:monkeys)
other          : do_thing(:bananas)
else             return
end

but elsewhere, the colon was in different places (right after the
conditional, or a space before the statement).

I don't speak japanese, but this seems to be relevant:
 http://shakenbu.org/yanagi/d/20060718.html#p01

Anyone care to make a broad, sweeping "this is the preferred way"
statement for when context is somewhat neutral?

q1: separator on short-line conditionals
(a) then
(b) semicolon
(c) colon (screw matz! we're taking it back!)

q2: spacing
(a) separator with the conditional (when blah:    stuff)
(b) separator lined up (when blah         : stuff)


________
courtenay
http://caboo.se @o O@
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to