> > a = Hash.new { |hash_self, unknown_key| > > hash_self[unknown_key] = "" > > } > > > > a[1] << "a" > > p a # {1 => "a"} > > > >I believe this feature will be adopted in the near future ;-) > > > > Thank you very much! I answered Hugh before seeing your answer, but this > addresses all my complaints. It would be wonderful if you also add a > similar alternative constructor for Array. Are you talking about automatic instantiation of a variable as non-nil when an assignment happens? If so, I would also like to see the same for FixNums and Strings. i.e.: x += 1; will create x with a value of 0 and then add 1 to it if it does not already exist. I do see the argument against what I am proposing: typos may not be seen until it's too late. But since all variables are locally scoped by default and most blocks are fairly small, I think the eye will detect the typos pretty easily. regards, -joe