[jhc] Atoms, Infos and unique ids.
john at repetae.net
Thu Feb 21 15:09:28 EST 2008
On Thu, Feb 21, 2008 at 08:32:47PM +0100, Lemmih wrote:
> I tried to implement this but, unfortunately, atoms are frequently
> being relied on for unique ids. Some cases are easy to fix, others
> less so.
> John, do you have time to document the intended behavior in the difficult cases?
I am not sure what you mean by difficult cases or what you are trying to
fix, atoms are exactly an implementation of the standard atom
type in computing as used in prolog, lisp, and the X11 protocol among
other things. Uninterpreted strings with a very fast identity operation.
Things got a lot better in terms of space once I made them a custom
binary implementation, that saved 7 bytes an atom which is often as long
as the string itself.
In any case, I would want any solution to be completely independent of
the fact that atoms are being used as identifiers in a programming
intermediate langauge. My Atom type is a generally useful library I use
other places. I would think this would involve a custom Binary monad
that distributed and collected an 'atom environment' of sorts that would
then be stored in a different chunk in the file, then whenever one
wanted to store/retrieve an atom, they would just add an index into the
John Meacham - ⑆repetae.net⑆john⑈
More information about the jhc