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

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Dec 23 14:01:24 AEDT 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.

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