hi,
i am searching for an implementation of a hierarchic datastructure that
behaves similar to a file system except that get of an inexistent path
returns nil and set of an unexistent path creates the required nodes
silently.

example:
d=HierarchicData.new

d[:foo, :bar] # => nil
d[:foo, :bar]=42
d[:foo, :bar] # => 42

d[:foo, :foo, 0, 1, :bar]=Object.new # creates a hash in an array in an
array in a hash in a hash

i want to check if this kind of data structure (or similar) has been
implemented already as library. if not i am going to do it.

sure there’s no problem implementing it … I guess it has been
implemented a thousand times by a thousand different people. i am
asking if anyone knows a library because it might feature iterators,
clever error handling code, etc. and it might be tested better than yet
annother quicky-hacky-implementation.

are there any libraries or prominent applications known?
thanks for response,
– henon

sure there’s no problem implementing it … I guess it has been
implemented a thousand times by a thousand different people. i am
asking if anyone knows a library because it might feature iterators,
clever error handling code, etc. and it might be tested better than
yet annother quicky-hacky-implementation.

are there any libraries or prominent applications known?
thanks for response,

The basic idiom is so simple (two lines, see my last posting) that it
doesn’t make any sense to package that into a lib. I don’t know whether
your requirements are met by anthing done already. Did you check the
RAA?
That’s usually a good starting point.