Petr: Posting the note about how the index works and the relevant code
snippet to avoid a questions avalanche was probably a good idea.  I bet
you weren't expecting it to turn into a big debate about a single Maybe!
I do hope this goes in some sort of hashed-storage documentation, either
in the repo or the wiki.

On Mon, Jun 08, 2009 at 20:28:46 +0200, Petr Rockai wrote:
> There really aren't any elegant ways to deal with Maybe. And for goodness 
> sake,
> it's not like any code outside of Index is ever going to see that undefined...

I can see that iName never gets called outside of Index if that's what
you mean.  Also, it's worth noting that this is only one of two uses of
undefined in the hashed-storage code, both of which could be usefully
transformed to error statements as Petr suggests.

> > I don't mean to sound like a jerk, but what your suggesting is a
> > huge turn off for me as a darcs user.
> See, this is totally read only as far as your repositories are
> concerned.

Jason: I don't think you sound like a jerk here, but I feel you may be
blowing this out of proportion.

Petr: Seeing these undefineds from the perspective of somebody that does
not know hashed-storage inside and out can be scary.  Jason's absolutely
right to point it out and try to advocate solutions.  Fair enough if you
think it that the cure is worse that the disease, but if you want to
bring this thread to a close, perhaps the most efficient technique is to
make such people less scared.  Pointing out that this is totally read
only and that Storage.Index is as bad as it gets are good starts.  Maybe
also:

 - change the undefined to error, as you suggest and paste in the
   the revised version to make this concrete

 - toss in a quick comment (i.e. in the function) on why we never
   expect the error case to be hit

> Moreover, this is becoming pointless quickly, diverting precious time
> that could be spent improving the code into bikeshedding.

Eh, it's just part of our charmingly human nature!  I do think it's
important to take these tendencies into stride.

Thanks for pointing out the yes-no loop we've gotten into, though.
If it looks like we're still stuck in it, I'd suggest a small
lateral shift, anything different like bringing in your co-mentor
for a third perspective.

Cheers,

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: pgptsvIO4f1yc.pgp
Description: PGP signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to