On Tue, Sep 02, 2008 at 01:37:48PM -0700, Jason Dagit wrote: > On Tue, Sep 2, 2008 at 12:54 PM, <[EMAIL PROTECTED]> wrote: > > Tue Sep 2 20:57:45 CEST 2008 [EMAIL PROTECTED] > > * Refactor Cache's handling of hashed paths. No functional change. > > > > Factored out the filepath building to a single place. This also led to > > folding > > the explicit pattern matches on writability into a predicate, since the > > other > > components of a CacheLoc are no longer useful in the function bodies. > > This seems fine to me.
Likewise. > > Tue Sep 2 21:35:59 CEST 2008 [EMAIL PROTECTED] > > * Use qualified imports and shorter names on Cache functions. No > > functional change. > > I like qualified imports just fine. I think Data.ByteString sets a > good example here. We don't do it much in darcs currently, but I > think I like this change. I generally dislike qualified imports, and think that this is a bad precedent that Data.ByteString has set. When you find that you want to use precisely the same names in several modules, you probably should define a type class. It's unfortunate that the Prelude stomps on all the best names, but I don't think qualified imports are a reasonable substitute for what ought to be type classes. However, in this case I think it's not so bad. I don't like the use of fetchFile, because we've already got a fetchFile with a type that is too different. In general, I think that even with qualified imports, we should have a one-to-one mapping between functionality and function names. For Cache it's not too bad, since it's a private module that can only be used in a few other modules. But still, the idea of designing a module that is buggy when imported without qualification is just repulsive to me. As you can see, I'm doing a bit of flip-flopping on this change. But I think I will reject it, simply because the code would be confusing (to me) if it weren't imported with qualification, and I find that confusing. -- David Roundy http://www.darcs.net _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
