On 20.11.2013 21:17, Dicebot wrote:
On Wednesday, 20 November 2013 at 20:06:04 UTC, Andrei Alexandrescu wrote:
What I meant is there are consistent styles that are objectively
worse. Consistency is necessary but not sufficient.
And what I meant is this opinion of yours is wrong. Any consistent style
that is liked by at least one programmer that uses it in practice is no
worse than any other possible consistent style. There is nothing
objective about it, pretty much as there are not that much common about
human perception.
I think you misunderstand Andrei here. There are styles that are
consistent that are not liked by *any* programmers. These styles are of
course not in use.
A style that says you should use seventeen blank lines between
functions, and each blank line should have 3 tabs and 2 spaces,
alternating, may be consistent, but it's also ugly, and I daresay that
is objective (as in, nobody would disagree, I don't believe in perfect
objectivity).
A less constructed example may be where a non-programmer manager has
seen that he cannot understand what his programmers are writing, and
decides to formulate some coding style to make it easier for him, but
which severely hamstrings actual programmers. (though I guess in this
case, one could argue it's subjectively better for him...)
--
Simen