dictionaries (was Re: new syntax - a provocation)

Richard A. O'Keefe ok@REDACTED
Mon Sep 29 01:24:50 CEST 2003


Chris Pressey <cpressey@REDACTED> continues to insist on
missing the point.
	To summarize:  you asked, "Why not use the dict module?"  and
	you gave a bunch of reasons based on the current implementation,
	and I pointed out that the representation of dicts is undefined
	- so the implementation of the dict module is _irrelevant_ - so
	you *can* (and in fact we probably *should* for the sake of
	easement) use the dict module (**interface**).

Imagine a frustrated scream here.

My proposal is just plain *INDEPENDENT* of the dict module.
It's a historical accident that there IS a dict module.
My proposal is not intended as a replacement for the dict module.

THERE IS NOTHING TO BE GAINED BY IMITATING AN OLD BAD INTERFACE.

	And in the quoted paragraph above you seem to realize that.  Boffo.  My
	work here is done.  The rest of your message is commentary that dodges &
	hovers around that central point.  Except for:
	
	> We don't need a new interface for _that_, but do you really _like_
	> the existing interface?  There were _reasons_ why I proposed a
	> different interface.
	
	It's not a matter of me _liking_ it.  It's a matter of there being
	umpteen hundred (thousand?) lines of code already _written_ for it.
	
What in the name of sanity has that got to do with anything?
I have never proposed that the 'dict' module be withdrawn or changed
in any way.  It is Chris Pressey who suggested changing it.
I don't *CARE* how much code uses the 'dict' module (except to feel
sorry for the people who wrote that code) because I AM NOT SUGGESTING
ANY CHANGE WHATSOEVER IN THE SLIGHTEST to the 'dict' module.

It is an imporant fact about the dict module that it *has* an implementation
in Erlang, which means that it uses Erlang data structures, which means that
it cannot be used to implement a new kind of primitive data structure.

If you change it to use a new primitive data structure,
THAT WILL BE AN INCOMPATIBLE CHANGE.  That's not my suggestion at all.

I have suggested (and it turns out that Joe Armstrong has also suggested)
a new *primitive* data structure for Erlang.  Putzing around with the
'dict' module would IN NO WAY simplify the implementation of that new
primitive data structure, while there are ways in which it could break
existing working code.

Y'know, I was careful *not* to use the name 'dict' for these things.
I did have good reasons.  "Dictionaries" are not "dicts" are not
"dictionaries".  They are obviously similar, but they are DIFFERENT,
and independent.  There is no reason whatsoever why dictionaries should
have the same interface as dicts, and many reasons why they should not.
	



More information about the erlang-questions mailing list