From: Trans Date: 2007-01-14T07:12:56+09:00 Subject: Re: a most undangerous Hash#store! Martin DeMello wrote: > On 1/13/07, Mauricio Fernandez wrote: > > > > Do you feel that store_{once,new,unique} is too long? > > (I have a slight preference for "once"; "unique" seems a bit puzzling since it > > seems to refer to the key, which is always unique) it's okay. but i would prefer the best and most concise name reasonably possible, of course. > Even 'store_once' seems to refer to the value rather than the pair, > which is why I like "underlay" - it suggests that if there is > something already in the hash, it will mask the value you are trying > to add. ah, 'underlay' as opposed to 'overwrite'. i see where you're coming from there. with #insert i was thinking about databases where insert is used to add a record but not to modify it -- ie. if the record key is already present you can't insert a new one. i understand that 'insert' isn't prefect though. i tend to prefer keeping array and hash in sync for polymorphism's sake, but #insert just doesn't have an array-like meaning since it isn't ordered. but maybe an even simpler tern would suffice -- #add. t.