"Jonas Delfs" <jonas / NOSPAMdelfs.dk> writes:

> "Yukihiro Matsumoto" <matz / ruby-lang.org> skrev i en meddelelse
> >     on 02/03/27, ts <decoux / moulon.inra.fr> writes:
> >
> > It does not store the evaluated default value.  Should it?
> 
> If not it will not be possible to do var['index']['anotherIndex'] =
> 'value' without having defined var['index'] to be a Hash first, so
> in this case: yes.  But, I can also think of situations where it
> would be very unhandy if an index gets a value just by accessing it.
> 
> Maybe we can provide an optional argument to 'new'?

Perhaps the distinction is whether it's being used as an lvalue or an
rvalue. As an lvalue, it should be stored, but as an rvalue it
probably shouldn't.


Dave