Konrad, Yeah, there are discussions of two libs there. The idea is that most of the fn in this thread will be used for table-utils.
The last entry is the most relevant to a map-utils library. Check out the visitor stuff: http://groups.google.com/group/clojure-dev/msg/6c1bbce17cafdf52 The idea is to take your generic functor application idea and put it on steroids. I'm going to be writing about this a lot more once 1.1 is out the door. A whole lot. Sean On Dec 18, 3:50 am, Konrad Hinsen <konrad.hin...@fastmail.net> wrote: > 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/9a518... > > > 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