[m-rev.] diff: varset.m cleanup

Ralph Becket rafe at cs.mu.OZ.AU
Wed Dec 24 10:31:33 AEDT 2003


Zoltan Somogyi, Tuesday, 23 December 2003:
> On 21-Dec-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > -	VarSet0 = varset(MaxId, Names0, Vals),
> > > +	Names0 = VarSet0 ^ var_names,
> > >  	map__set(Names0, Id, Name, Names),
> > > -	VarSet = varset(MaxId, Names, Vals).
> > > +	VarSet = VarSet0 ^ var_names := Names.
> > 
> > I would recommend writing that as
> > 
> > 	varset__name_var(VarSet0, Id, Name, VarSet) :-
> > 		VarSet = VarSet0 ^ var_names ^ det_elem(Id) := Val.
> 
> I find the code you recommend much significantly harder to read than the
> original, so I won't be following that recommendation.

Really?  I'm with Fergus on this one.  But it's your call.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list