[m-rev.] for post-commit review: centralize decisions about mutables' aux preds

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Sep 6 02:45:18 AEST 2019



On Thu, 5 Sep 2019 21:25:18 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> > :- pred non_empty(set(T)::in) is semidet.
> > :- pred is_non_empty(set(T)::in) is semidet.
> 
> I think we should consider deprecating empty/1 and non_empty/1 in favour
> of the is_ versions.

Thanks for the review. The diff for the whole change is attached, though
it is too boring to review, as there are no meaningful code changes.

I followed your other suggestions, but not this one just yet. The exercise
has told me that there are other predicates we may wish to deprecate.
For example, several set modules have both foldN and foldlN predicates
that do the same thing, and likewise many have both list_to_set and
from_list predicates. On the other hand, there are predicates that exist
in some set modules that one could argue should exist in all of them, such as
a predicate for converting a *reverse* sorted list to a set. And in some cases,
all set modules have a predicate, but in some it has only an in,out mode,
while in others it has a di,uo mode as well.

Fixing these issues is not urgent, but it would be nice to eliminate such
unnecessary differences.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.set
Type: application/octet-stream
Size: 842 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20190906/356fa01b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.set
Type: application/octet-stream
Size: 294987 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20190906/356fa01b/attachment-0003.obj>


More information about the reviews mailing list