[m-rev.] For review: New predicates in assoc_list

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Mar 22 16:05:55 AEDT 2010


On Mon, 22 Mar 2010, Paul Bone wrote:

> On Sun, Mar 21, 2010 at 05:56:15AM +1100, Julien Fischer wrote:
> >
> > On Wed, 17 Mar 2010, Paul Bone wrote:
> >
> > > Branches: main
> > >
> > > Introduce new predicates in the assoc_list standard library module.  These
> > > predicates complement the existing fuctions map_keys_only/3 map_values_only/3
> > > and map_values.
> > >
> > > library/assoc_list.m:
> > >     As above.
> > >
> > > NEWS:
> > >     Announce this change.
> > >
> > >     Rename old "since Mercury 0.13.1" section to "for Mercury 10.04 beta"
> > >     and introduce new "since Mercury 10.04 beta" section.
> >
> > As discussed in person, I don't think there is much point in adding
> > these since the predicates in your other change that use them could
> > easily be turned into functions.
> >
> > There is some disadvantage to adding them, because having both predicate
> > and function versions provides more scope for type ambiguities.
>
> This is a general problem that keeps reoccurring.  We should write a policy and
> make it part of our style guide.  This will establish one of the two options as
> the correct option (for most cases) and help any new developers that haven't
> seen this e-mail thread.
>
> > The diff looks fine.
>
> I'm getting mixed messages here.  Should I refactor my code or should I commit
> this diff and ignore the above criticisms.

I don't feel strongly one way or the other.  What I was attempting to
convey is that the diff is fine should you choose to commit it light of
the above.

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