[m-rev.] Re: for review: parsing_utils improvements

Ralph Becket rafe at csse.unimelb.edu.au
Tue Sep 29 14:30:36 AEST 2009


Hi Ian,

Paul forwarded your diff to me (I have an over eager spam filter...).  I
have some Real Objections!

(1) You call record_progress all over the place.  Why not just in, say,
the next_char predicate?  The code is pretty ugly with all those
impure scopes.

(2) Every call to record_progress makes an allocation and updates
your error reference.  This is a Bad Thing for performance.

(3) Why are errors not part of the ordinary parser result?  If you want
a "quick bail out" error scheme, you can throw an exception.

(4) Making parse cc_multi is unfortunate.

-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list