On Thu, May 27, 2010 at 3:36 PM, Erik Söhnel <eriksoeh...@googlemail.com> wrote:
>
> Got something around, this is my 3rd or 4th attempt to provide a
> relational datastructure for clojure. I've often found myself in
> situations, where I needed some kind of table and look up rows by more
> than one key, hashmaps don't fit that well.

They are simply different abstractions. Perhaps at some point general
purpose languages will start embedding table/relation types, just like
it has happened for hashmaps or sets. There is no "one size fits all"
but there is still a merit for having a reasonable default
implementation deeply embedded in the language (just like seqs,
vectors, maps are in Clojure), especially if they happen to free
people from thinking about side effects.

> http://gist.github.com/415538 - basically is a hashmap which pretends
> being a set, and lets you access all 'rows'. Indexes (sorted, hash-
> map ...), except the primary one, are optional but will of course
> speed up lookup operations.
> I have not bothered about persistence yet, maybe in the future, there
> will be some interface to hook into the clojure STM, or Cells will be
> become available.

I haven't had a chance to play with your code yet but at first glance
it looks good. Does the above mean that all set operations are
automatically supported and the accelerated?

Do you think it is possible to implement join/union etc so that they
produce lazy relations (or just lazy-seq of rows)? That would be very
useful in many common use cases (instead of cursors).

As for the storage persistence - that's a low priority (at least for
me), but it would be good to have at least some method for tying a
relation to such storage (like a "tie" function in Perl).

Can you tell me more about these hooks to Clojure STM and Cells?

Thanks,

Andrzej

-- 
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