lists:keymerge/3

Richard A. O'Keefe <>
Thu Nov 4 03:38:35 CET 2004


David Hopwood <> wrote:
	"are picked before" is ambiguous in English.

As a native speaker of English, I have to disagree.
"before" does not mean "instead of".   It can, in certain very unusual
contexts, have that reading, but this is very far from a common reading.
It would certainly be a highly unusual way to say it if that was what
was meant.

There is a fairly strong Gricean implication that if someone had _meant_
"instead of" or "in preference to" they would have said so, instead of
using a term which almost invariably implies "both".

Don't forget the context:  we are talking about LISTS (so "before" can be
expected to mean "earlier in left-to-right spatial order"), and that's
precisely what it DOES mean in this instance.

	Without testing it I would have assumed the former.

In the context of a MERGE, "instead of" would be such an astonishingly dumb
and buggy thing to do that it would require a very strong explicit statement
to override our expectation that ALL the elements of BOTH lists are eventually
included.

	The documentation should
	be changed to say more precisely what was intended.
	
That would do little harm, but as it stands, it really is pretty hard
to misunderstand, if you know what a merge is.  (And if you don't know
what a merge is, you have no grounds for surprise at what you get.)




More information about the erlang-questions mailing list