[darcs-users] Handling _darcs paths (Was: Re: [patch156] ...)

Petr Rockai me at mornfall.net
Fri Feb 26 07:13:40 UTC 2010


Hi,

Ganesh Sittampalam <ganesh at earth.li> writes:
>>> hardcoded "_darcs/pristine.hashed" is not a good standard, IMO
>> Dunno. It's easier to write this way and it can't be changed most of the
>> time (only when we break backward compatibility) and is easy to grep
>> anyway. It also avoids an extra lookup when reading the code.
>
> I think we need to have a separate discussion on darcs-users to establish the
> standard one way or another.

it seems we need a decision whether we should use some sort of
abstraction over "_darcs/foo" (like a global constant, darcsdir and
concatenation, or something a little smarter or whatever).

Personally, I don't see a *pragmatic* reason to have this
abstraction. It neither saves any space/typing nor is it useful to make
things easier to change coherently (which are the two usual reasons for
abstracting things). On the other hand, it might make reading source a
little harder ("what exactly does that constant mean?" ...).

I agree that littering unnamed constants around source is more often a
bad idea than not, but I am not convinced about this case. On the other
hand, if there is to be a lengthy flamewar, that outweighs any benefits
not going through this exercise might have. So to avoid bikeshedding,
there's a couple ideas, you may add your own, but preferably cast a vote
in favour of one of these:

1) "_darcs/pristine.hashed"
2) darcsdir "pristine.hashed"
3) darcsdir hashedPristineDir
4) darcsdir HashedPristineDir
5) darcsdir HashedPristine
6) hashedPristineDir -- includes "_darcs"
7) darcsdir ++ "/" ++ "pristine.hashed"
8) darcsdir ++ "/" ++ hashedPristineDir
9) darcsdir ++ "/" ++ hashedDir HashedPristine
10) any of 5-7 with </> instead of ++ "/" ++
11) Some variation of the naming. (dir_hashedPristine, ...)

Yours,
   Petr.


More information about the darcs-users mailing list