On 12/19/2013, 12:57 PM, Till Schneidereit wrote:
I think we should do more than encourage: we should back out for all
style guide violations. Period. We could even enforce that during upload
to a review tool, perhaps.
However. This has to be done on a per-module basis (or even more
fine-grained: different parts of, e.g., SpiderMonkey have slightly
different styles). Different modules have vastly different styles,
ranging from where to put braces over how much to indent to how to name
fields/ vars/ arguments. I very, very much doubt we'll ever be able to
reconcile these differences. (Partly because some of the affected people
from different modules sit in the same offices, and would probably get
into fist fights.)
See, that right there is the root problem! Programmers tend to care too
much about their favorite styles. I used to be like that but over the
years I've mostly stopped caring about which style is better, and what I
want now is consistency, even if the code looks ugly to *me*. The
projects which enforce a unified style guideline have this huge benefit
that their code looks clean and consistent, as if it was all written by
the same person. But letting each module enforce its own rules leads to
the kind of code base which we have now where you get a completely
different style depending on which directory and file you're looking at.
I think trying to enforce this kind of inconsistency with tools is
strictly worse than what we have today.
If we stepped back for a second and agreed to put aside our personal
preferences and value consistency more, we could use tools to enforce
the style guidelines and we'd end up where other code bases that have
done this are right now.
That all being said, I'm sure there are people who don't value
consistency as much as I do and are more interested to have the code
they work on the most look beautiful to them. I think these two camps
are at odds with each other and so far the latter camp has "won" this
battle. :/
Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform