[PATCH] util: rename _windows_reserved_filenames and _windows_reserved_chars

Jason Harris jason at jasonfharris.com
Sun May 8 04:25:16 CDT 2011

On May 8, 2011, at 10:03 AM, Adrian Buehlmann wrote:

> On 2011-05-08 09:50, Sune Foldager wrote:
>> On 2011-05-08 09:41, Adrian Buehlmann wrote:
>>> On 2011-05-08 08:57, Sune Foldager wrote:
>>>> On 08-05-2011 00:29, Adrian Buehlmann wrote:
>>>>> On 2011-05-07 23:38, Sune Foldager wrote:
>>>>>> On 2011-05-07 23:07, Adrian Buehlmann wrote:
>>>>>>> # HG changeset patch
>>>>>>> # User Adrian Buehlmann<adrian at cadifra.com>
>>>>>>> # Date 1304799920 -7200
>>>>>>> # Node ID 4168febc29ffaee26de5cc1b1289454e4c85debf
>>>>>>> # Parent  fe2153fd0fe5de49790e82d8038f5e07dd502e63
>>>>>>> util: rename _windows_reserved_filenames and _windows_reserved_chars
>>>>>> I realize we have this no-underscore policy, which I don't agree with, but is
>>>>>> this really supposed to be an improvement?:
>>>>>>> -_windows_reserved_filenames = '''con prn aux nul
>>>>>>> +_winresnames = '''con prn aux nul
>>>>>> Res? Resource names?... this is the primary reason I am opposed to
>>>>>> no-underscores :p.
>>>>> Yeah. In *that* code, it is really hard see what _winresnames is
>>>>> supposed to be hmm? You even had to delete the interesting bits, to
>>>>> prove your point :-)
>>>> Well, I didn't claim to *prove* anything. I just don't like shortening
>>>> such names just so they can look less ridiculous when you remove the
>>>> underscores from them.
>>>>> Oh. Yeah. Let's see. And the function is called checkwinfilename. What
>>>>> the heck is win again. Hmmm.
>>>> Well, I think 'win' is a bit more established and unambiguous than 'res'.
>>>>> I'm sure the next email is coming from Martin :-)
>>>> Oh come on now... et tu?
>>> Instead of trolling and continuing to declare that you disagree, you
>>> could propose a compromise or do something constructive.
>> Easy now, tough guy. I think you're doing the trolling around here. I didn't
>> take it personal or bing other people into it. Also, what I do or don't do is
>> none of your business, so get off my back and mind YOUR own bussiness.
>> Critique of patches is what we do here, so if you don't like it, don't post
>> them.
> Arrogant and poisonous as usual (note this is a critique).

> The goal of this patch is to bring these names in line with the current
> official project policy as stated at
> http://mercurial.selenic.com/wiki/CodingStyle
> Can you please explain how you want to have these names in this patch
> changed, such they comply with that?
> Or what is the purpose of your critique?

As a person on the side lines... Reading the Mercurial source code is not
as clear as it could be. The trend in most modern systems is to have self
documenting code with long names. Eg Cocoa, Qt, Java, etc. having the
munged names used in Mercurial makes the code very hard to read for
casual coders / experimenters.

In that sense the Mercurial source code is not "self-documenting". Which
is a shame. 

Eg even if you don't know the various context and if you see some name
like 'setValueForKey' its just a heck of a lot clearer than 'setval'. Just as
_windows_reserved_filenames is a heck of a lot clearer than _winresnames

(On the flip side at least the Mercurial sources are I guess fairly consistent...)

In any case, I don't think Sune (judging from his public emails) is arrogant
or poisonous at *all*. Not at all.


More information about the Mercurial-devel mailing list