From: Dan Sugalski <[EMAIL PROTECTED]>
   Date: Wed, 8 Jun 2005 16:22:35 -0400

   At 4:05 PM -0400 6/8/05, Tolkin, Steve wrote:
   >. . . Dan Sugalski says: "I'd just pitch an exception if code 
   >deletes an entry  ..."
   >
   >Perhaps this is OK, because this code is intended for internal use 
   >only.  But people like to reuse code, and if anyone writes an 
   >ordered hash module on top of this code it will have a bug.

   Which is why it ought not get reused.

   The whole point of the original ordered hash was to support lexical 
   pads as fast as possible while still allowing by-name lookup for 
   introspective code. Doing anything that compromises fast array-based 
   lookup would be ill-advised for that. If it makes sublclassing tough, 
   well... subclassing continuations is likely going to be problematic 
   too, but that's fine . . .

Maybe the problem lies in thinking of this as an "ordered hash" when it
really functions as a "keyed array."  People expect to be able to delete
hash entries, but not always array entries.  So a name change might make
inability to delete less of an issue.

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

Reply via email to