Could you tell me where to find that? Thanks. -- Dan<br><br><div class="gmail_quote">On Tue, Jun 14, 2011 at 3:50 AM, Alessio Stalla <span dir="ltr"><<a href="mailto:alessiostalla@gmail.com">alessiostalla@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Tue, Jun 14, 2011 at 9:37 AM, Marco Antoniotti<br>
<<a href="mailto:antoniotti.marco@disco.unimib.it">antoniotti.marco@disco.unimib.it</a>> wrote:<br>
><br>
> On Jun 13, 2011, at 21:18 , Daniel Weinreb wrote:<br>
><br>
>> Friends,<br>
>><br>
>> I wrote a little package for "fash hash tables", which provide an<br>
>> abstraction that is analogous to that of Common Lisp hash tables, but<br>
>> is faster for tables with few elements, and only slightly inferior for<br>
>> tables with many elements.<br>
>><br>
>> I did this because performance analysis showed that our system was<br>
>> spending too much time in hash table operations, and using the new<br>
>> package helped.<br>
>><br>
>> I have recently been cleaning this up, one reason being that I'd like<br>
>> to open source it. The function names used to be things like getfhash<br>
>> and mapfhash. Now they are like fhash:get and fhash:map-elements and<br>
>> so on.<br>
>><br>
>> However, before I open-source it, I was to make sure it's "right". It<br>
>> recently occurred to me that the package name "fhash" has problems.<br>
>><br>
>> Here are pros and cons of changing it that I can see.<br>
>><br>
>> Pro: I's not a hash table in the small-cardinality case; it's a linear<br>
>> lookup. So the name is not actually accurate.<br>
>><br>
>> Pro: Calling such a data structure a "hash table", even as Common Lisp<br>
>> does, is an abstraction violation. Whether it works by hashing is an<br>
>> implementation detail. The Java collection library calls this a Map.<br>
>> Python calls it a dictionary. Clojure calls it a map. Those are both<br>
>> better names.<br>
><br>
> Actually, in Java the naming reflects the separation between abstraction and implementation. AFAIU, clojure does not quite do this and neither does Python.<br>
><br>
> I would advocate settling down on a Java-esque nomenclature with MAP or DICTIONARY as "names" for the abstraction and with different names for the implementations; e.g., DICTIONARY-TREE, DICTIONARY-FHASH, DICTIONARY-HASH-TABLE, you name it....<br>
<br>
</div></div>AFAIK, Java started just like Lisp with the Hashtable class<br>
(implementation without interface) which later was deprecated in favor<br>
of Map (interface) + HashMap, TreeMap, ... (implementations).<br>
There is already a somewhat official API for extensible sequences,<br>
designed by Christophe Rhodes and implemented in SBCL and ABCL (and<br>
maybe others, I don't know). We could similarly have extensible maps,<br>
even though "sequence" is an already recognized abstraction in CL,<br>
while "map" is not.<br>
<font color="#888888"><br>
Alessio<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
pro mailing list<br>
<a href="mailto:pro@common-lisp.net">pro@common-lisp.net</a><br>
<a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro</a><br>
</div></div></blockquote></div><br>