I think that I'm with Ehsan on this one.  The value of consistency is such that 
I think people should be prepared to suppress their inate prejudices in 
deference to more important goals (wider consistency, better tooling, better 
productivity).

That said, the only time I've ever seen that work is where a style is imposed 
from upon high in the form of an edict.

----- Original Message -----
From: "Jeff Gilbert" <jgilb...@mozilla.com>
To: "Ehsan Akhgari" <ehsan.akhg...@gmail.com>
Cc: "Till Schneidereit" <t...@tillschneidereit.net>, "Martin Thomson" 
<m...@mozilla.com>, "Gregory Szorc" <g...@mozilla.com>, "Nicholas Nethercote" 
<n.netherc...@gmail.com>, "Bobby Holley" <bobbyhol...@gmail.com>, "Andrea 
Marchesini" <amarches...@mozilla.com>, "Mike Hommey" <m...@glandium.org>, 
dev-platform@lists.mozilla.org
Sent: Thursday, December 19, 2013 2:29:27 PM
Subject: Re: On the usefulness of style guides (Was: style guide proposal)

It's compromise. I think we can take it as given that we'll never all agree on 
one way to do things, so instead, different modules do their own things. I 
think this is a pretty decent solution, though the problem becomes needing 
different guides for different modules. (the "just mime what you see" 
is...imperfect)

I posit that there's probably not much benefit to having, say, style for dom/ 
match style for gfx/, since precious-few people often deal with both at once.

-Jeff

----- Original Message -----
From: "Ehsan Akhgari" <ehsan.akhg...@gmail.com>
To: "Till Schneidereit" <t...@tillschneidereit.net>, "Martin Thomson" 
<m...@mozilla.com>
Cc: "Gregory Szorc" <g...@mozilla.com>, "Nicholas Nethercote" 
<n.netherc...@gmail.com>, "Bobby Holley" <bobbyhol...@gmail.com>, "Andrea 
Marchesini" <amarches...@mozilla.com>, "Mike Hommey" <m...@glandium.org>, 
dev-platform@lists.mozilla.org
Sent: Thursday, December 19, 2013 2:11:52 PM
Subject: Re: On the usefulness of style guides (Was: style guide proposal)

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
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to