[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Method lookup search



On Apr 3,  6:23pm, Danny Jared Epstein wrote:
} I've been thinking about your suggestion that a breadth-first search
} be used to find inherited slots, rather than the existing

  Aagh. Been procrastinating my post for too long now. Like all
procrastinators, it had to be perfect. Danny has outlined the problem
as I see it.

} case would cause an ambiguity.  Although prototype a can override
} traits a, prototype b will inherit both slots rather than just the one
} in prototype a.
  
} You end up having to put slots in prototype b which do directed
} resends.  The search orders (expressed as a list of sets) for the

  Which is a pain, because these are your INSTANCES. And you'd like
them to contain the maximum of usefull information. It is also a pain
if you got thirty different methods.

} A breadth-first order would search a level at a time, presumably
} causing an ambiguity if several slots are found at a given level.

  I would think of it this way:
 
  At first, you have just the set of slots in self. Look for the slot.
  1) Sort your parent slots by priority in your list, and insert the
parent's slots in place of the parent. Look for the slot.
  2) Do (1) until you expand no parent slots. 

} The breadth-first obeys this rule, but the existing depth-first
} priority scheme could be modified to enforce the above rule as well.

  I'll have to look at this when I'm in the mood to think.