[erlang-questions] data sharing is outside the semantics of Erlang, but it sure is useful

James Hague james.hague@REDACTED
Tue Sep 15 15:50:12 CEST 2009


> Sounds like you want "hash consing".

Hash consing is a heavyweight solution.  It's got a fixed cost for
something that's usually irrelevant.  What I really want is a function
that takes a data structure and returns a new version with maximal
sharing.  I can write special case versions of that in Erlang, but
it's messy and feels like something that should be a general library
service.


More information about the erlang-questions mailing list