Hello,

Why not to have an iterator over the hash like
Hash.each_pair(function(key, value){...});
as a shortcut for
Hash.each(function(pair){
   var id = pair.key, obj = pair.value;
});
The point is that if one makes heavy use of hashes in code, this small
redundancies get really annoying. Why bother with reassignment at all?
Well, most importantly it makes make the code more readable, as the
name of the variable reflects the semantics, while "pair.value"
doesn't.

Cheers,
Mikhail.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to