[m-rev.] for review: priority search queue ADT

Paul Bone paul at bone.id.au
Mon Nov 24 19:55:46 AEDT 2014


On Fri, Nov 21, 2014 at 03:08:10PM +0100, Matthias Güdemann wrote:
> Hi,
> 
> here is a new version which includes the changes I described in the last
> mail. In particular:
> 
>   - the type is now psqueue(P, K), i.e, has the priority as first
>     argument, just as pqueue does
>   - the argument order of the predicates is now in line with first
>     priority then key
>   - all predicates which transform a psqueue have the in/out mode
>     psqueue pair as last arguments, to allow for state threading

That sounds good.

> Note, that the sequence of priority and keys is only changed for the
> interface; in the implementation, both the internal type representation
> and view types have not been changed.

What is the reason for not changing this?  If they have the same argument
order then someone who modifies the psqueue code at some latter time will be
able to learn how the code works more easily if it matches the interface
they have already learnt.

Thanks.


-- 
Paul Bone



More information about the reviews mailing list