[Please excuse the resend; mail server issues] On Sun, Dec 17, 2006 at 01:11:00 +0100, Eric Y. Kow wrote: > Sat Dec 9 12:57:55 PST 2006 David Roundy <[EMAIL PROTECTED]> > * make optimize less DarcsRepo-specific. > > Sat Dec 9 14:19:30 PST 2006 David Roundy <[EMAIL PROTECTED]> > * change Maybe Patch to Hopefully Patch.
Thanks, David; I'm definitely accepting this. Since this is code I actually (think) I understand, I'm going to let rip with the opining: The Hopefully change is clearly an improvement: 1) Instead of errors just causing a "bug in darcs" right there on the spot (see impossible.h); we just pass them up the chain. 2) Certain errors like Parsec errors are now being passed up instead of silently discarded in Nothing. 3) We avoid the horror from fromJust. Likewise, more fail and less error seems like a good thing Comments and Questions ---------------------- 4) Why do we have a separate HopefullyPrivate module? 5) There is one disadvantage to this new code, and that is that we lose the source code line numbers that tell use where the fromJust/ hopefully error was triggered. I would argue that this is worth getting back, because hopefully still gets called in many different places, so it might not be entirely clear why/when patch stuff becomes Unavailable. Would it be possible for hopefully to have some of the same impossible.h line number magic? That would cover the top of the chain, just like fromJust did. What would also be nice is if we could cover the bottom of the chain by putting the same magic in our calls to the Unavailable constructors. 6) Perhaps we should have the style checker "enforce" that Unavailable should never be passed the empty string. We now have much more capacity for error tracking, so it seems like we should adopt a discipline of actually using it. 7) DarcsRepo. apply_cautiously - why not just use hopefully? Match.find_a_patch - why not just use hopefully? 8) hopefullyNoParseError should really be refactored, no? I see it in several places. 9) What is "actually" (small a) for? Why not just use Actually? -- Eric Kow http://www.loria.fr/~kow PGP Key ID: 08AC04F9 Merci de corriger mon français.
pgpafWtgVP4X1.pgp
Description: PGP signature
_______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
