Why we don't use underbars

Sune Foldager cryo at cyanite.org
Fri May 6 02:42:13 CDT 2011


On Fri, May 06, 2011 at 09:32:49 +0200, Dirkjan Ochtman wrote:
>On Fri, May 6, 2011 at 09:23, Martin Geisler <mg at aragost.com> wrote:
>> My feeling is that we have to look at the code anyway to remember the
>> name of the constant. We might memorize the name of the constant after a
>> while, but that includes memorizing the position of any underbars. At
>> least this is my experience.

I agree, especially when you come back to it after a little while.

>Meh. Maybe that works for you, but I'm pretty sure consistency is
>king. That way, you don't have to remember the way the variable is
>spelled, you can just remember the words in it and figure out the
>spelling from your knowledge about the coding style.
>
>Not obeying the coding style is pretty much like putting typos in your
>variable names. Do you really want to argue that it doesn't matter
>because you'll get it right after you've looked at the misspelled
>name?

You can't be serious. Anyway, if underscore style is so important (and
I admit it's more important in languages like python where you get no
help from anyone than your brain), then why doesn't someone go through
the code and remove all underscores?  death to the underscores!!

-Sune


More information about the Mercurial-devel mailing list