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

Matthias Güdemann matthias.guedemann at googlemail.com
Mon Nov 24 22:02:08 AEDT 2014


>> 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.

The original order Key, Priority is used throughout the cited paper,
in particular for the internal view types. Therefore someone who
consults the paper. e.g., for fixing s.th. in the code, will have an
easier task.

My main motivation for changing the order in the type signature and
interface was to have it homogenous with the order in pqueue. Without
this, if s.o. would replace pqueue with psqeue and not adapt the
argument order, there would be no type error or warning, but the
result would be wrong.

Best regards,
Matthias



More information about the reviews mailing list