Standardizing config option naming
Greg Ward
greg-hg at gerg.ca
Wed Aug 10 18:45:21 CDT 2011
On Wed, Aug 10, 2011 at 5:54 PM, Matt Mackall <mpm at selenic.com> wrote:
> So we've been fairly inconsistent with naming config options. It's time
> to lay down the law here. And based on existing usage, the law should
> be: no separator on new options.
+1
An interesting consequence of "no separators allowed" is that long
identifiers are hard to read. A personal guideline that I try to
follow: if it's too hard to read without separators, it's probably too
long.
<completely irrelevant digression>
(And when you let developers create arbitrarily long identifiers, some
of them do crazy things. At work, it all started with
Tools/Java/StringUtilities/StringTransformer.java
Tools/Java/StringUtilities/StringCollectionTransformer.java
which are not too crazy. But they naturally spawned
Tools/Java/StringUtilities/NullRemovalStringCollectionTransformer.java
which is only slightly less insane than
Tools/Java/StringUtilities/StringTransformerBackedStringCollectionTransformer.java
Now when you consider the presence of
Tools/Java/StringUtilities/ToLowerCaseStringTransformer.java
it's only natural to create
Tools/Java/StringUtilities/ToLowerCaseStringTransformerBackedStringCollectionTransformer.java
and that, of course, demands the creation of
Tools/Java/StringUtilities/TestToLowerCaseStringTransformerBackedStringCollectionTransformer.java
I'm not kidding! This stuff is for real! Who could make this up?)
</digression>
Greg
P.S. please don't flame Java developers. The poor souls, they really
don't know any better. I actually feel sorry for them more than
anything.
More information about the Mercurial-devel
mailing list