[m-dev.] for review: changes to library/map.m

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Oct 21 14:25:15 AEST 1998


> 	Fix a cut-and-paste error in the comment for map__det_union where
> 	it was referring to map__insert instead map__union.

Tha's fine.

> 	Delete the error message argument from map__det_union
> 	and map__det_insert, for consistency with other det_* predicates,
> 	and to make them easier to use.

Deleting the error message argument would improve consistency and make
the predicates easier to use, but would make the predicates less useful.
Recompiling the program in a grade that supports stack traces is not
always feasible, and without that, a default error message from a library
predicate is just not enough to nail down the problem.

If anything, I think that map__lookup etc should be changed to take
an error message argument. We can keep the exiting versions for backward
compatibility.

Of course, what we actually need is the single predicate

p(Call, Msg) :-
	( Call ->
		true
	;
		error(Msg)
	).

but unfortunately it is not well typed or moded :-(

Zoltan.



More information about the developers mailing list