From: "Lloyd Zusman" <ljz / asfast.com>
>
[...]
> Also, to me, a good idea would be to have some sort of mixin that can
> be included in Hash that can add a `get' and `set' method that look
> something like this:
> 
>   h.get('a','b','c')
> 
>   h.set('a','b','c','xxx')
> 
> The `get' method would return nil (or perhaps throw an exception) if a
> non-existent node is being referenced; and the `set' method would
> create the internal structure as needed.
> 
> This construct would still be easy to read, understand, and maintain.
> And I believe that it should be relatively simple to write and use.

I like it.  It seems very straightforward, simple, and clean.  It 
wouldn't allow the mixing of arrays and hashtables in a single 
expression (as far as the auto-vivifying behavior is concerned,
anyway) but I don't think that's so big of a deal.

My personal preference would be for `get' to return nil, rather than
throw an exception.

Regards,

Bill Kelly