[m-rev.] for review: priority search queue ADT
paul at bone.id.au
Thu Nov 27 15:03:03 AEDT 2014
On Thu, Nov 27, 2014 at 02:42:36PM +1100, Julien Fischer wrote:
> Hi Paul
> On Thu, 27 Nov 2014, Paul Bone wrote:
>> I've adding this to Mercury at the moment. Do you have some test code that
>> I can commit to the test suite?
>> I'm very sorry for making this drag on. I'll commit the code now and fix up
>> the few minor issues with a commit of my own.
> If you're going to look at this then I won't bother a review of it
> before it's committed. A few things though:
> - the singleton/2 function should be exported.
> - the 'del_min' operation should named 'remove'.
> - the 'lookup' operation should be named 'search'.
> - the 'det_lookup' option should be named 'lookup'
> The above renaming are more consistent with the names in the
> map module etc.
I agree, I'd noticed some of these already.
One problem I have is that det_min should be named remove to be consistent
with pqueue.m, but delete should also be named remove to be consistent with
map.m However these two predicates do different things and therefore
shouldn't have the same name. I'd probably prefer to break the similarity
with map.m but I'd be happy to hear a second oppinion.
More information about the reviews