On Jun 9, 2009, at 8:49 PM, Richard Newman wrote:

> For now, as I'm storing maps in my sets -- I'm doing relational stuff,
> after all -- I just add an :id entry in each map, filled by (iterate
> inc 0). Functionally the same as a multiset, so long as I ignore
> the :id 'column'...


I am very fond of the relational functions in Clojure. That was one of  
the first things that started winning me over actually.

Forgive me if this is an obvious question, but what exactly is the  
disadvantage of the add-an-id approach? Or, another way, what would be  
substantially better about having multisets over just doing what  
you're doing? My understanding of relational theory and SQL (thanks  
largely to Joe Celko's books) makes me suspicious of needing  
cardinality—it sounds a lot like wanting access to the physical  
ordering on disk. Then again, a lot of my database tables wind up with  
a sort-order column or an auto-incrementing ID, I admit.

Of course, just because it violates relational theory doesn't mean it  
wouldn't be a great addition to the language. I'm curious.

Would you mind sharing the code with the error for the calculation  
you're doing?

—
Daniel Lyons
http://www.storytotell.org -- Tell It!


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