[cl-cookbook-contrib] [ cl-cookbook-Feature Requests-619966 ] Question/suggestion for hash-table pag
Brought to you by:
jthing
From: <no...@so...> - 2002-10-08 06:16:31
|
Feature Requests item #619966, was opened at 2002-10-07 15:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=447475&aid=619966&group_id=46815 Category: None Group: None Status: Open Priority: 5 Submitted By: Robert P. Goldman (rpgoldman) Assigned to: Nobody/Anonymous (nobody) Summary: Question/suggestion for hash-table page Initial Comment: I stumbled across this while looking for an answer to a poignant hash-table question. Namely, how does one make a hash-table whose entries are CLOS objects? The spec only requires that hash-tables accept eq, eql, equal, equalp as tests. Unfortunately, these are all equivalent to EQ when applied to CLOS objects. And none are generic functions. An answer to this question would sure be helpful! If I find a good one, I'll submit it. Cheers, R ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-10-07 23:16 Message: Logged In: NO I think you might be confusing CLOS objects with the ability to use GFs, so I want to ask: do you want a hash-table whose equality test is a GF, or a table which distinguishes CLOS objects by some means other than the four equality tests you (correctly) listed? If it's the first of these, then you're stuck. If it's the other you could write some code to extact the information you want out of a CLOS structure into - say - a list in such a form that equal would serve you. Hash-tables have to be restricted in this way, otherwise they'd be too inefficient to be usable. Maybe you shouldn't be using a hash-table? What are you trying to achieve? What would your equality test look like? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=447475&aid=619966&group_id=46815 |