On 17 Dec 2009, at 20:26, Sean Devlin wrote:

> Konrad,
> I am working on a different proposal on the dev list:
>
> http://groups.google.com/group/clojure-dev/browse_thread/thread/9a518c853bfbba8b#
>
> This is a more in depth version of these functions for maps.  I'd love
> to have you contribute to the discussion here.

I vaguely remember that discussion, but at the time I was too busy  
with other things to look at it. Now I did, but I don't think I have  
much to contribute. The way maps are used in the code examples of that  
thread just doesn't occur in the applications I have for Clojure.

Just one general remark: I don't think it is a good idea to structure  
libraries around Clojure datatypes, as it is implied by a library name  
such as map-utils. Clojure's built-in data types can implement many  
different data abstractions, and I'd prefer to structure libraries  
around those abstractions rather than around the concrete  
representations. BTW, this is also the reason why I like multimethods  
and protocols, as very often an abstraction can have multiple  
practically useful implementations.

Let's take maps as an example. A map can represent a table, or a small  
database. A map can also represent a function defined on a finite set  
of arguments. The operations used on maps are likely to be different  
for those two use-cases, and it is even quite possible that the same  
operation should have a different name for each application. So I'd  
rather see a library table-utils and another library discrete-function- 
utils. The latter should also provide implementations of its functions  
for vectors, which can represent functions defined on a finite range  
of integers.

The discussion in the thread you cite turns mostly around using maps  
to represent tables. As I said, I don't have much use for this, so my  
only recommendation is to call it table-utils rather than map-utils  
and to envisage altenative representations, such as on-disk databases.

Konrad.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to