Chouser---
Hmm, what to do in the meantime. What I was trying to do was write
a package that would take care of indexing fields, adding
backreferences, and creating 'plural' fields. For instance, suppose
you had people and accounts. People have names, incomes and (human)
parents; accounts have balances and signers:
(person :name :income [:parents])
(account :balance [:signers])
(By boxing a field I'm declaring it plural, meaning that assoc adds to
rather than replaces; I already wrote the macro for this, but not much
else yet.)
The package would add another field of backreferences, so that we'd
have for instance
{:name "chuck jr.", :income 20k, :parents [<ref to charles
sr.>] :backreferences [{:parents <ref to charlie III>}]}
{:name "charles sr." :income 80k...........}
{:name "charlie III"......}
We'd also have indices (sorted-maps) to all the names, incomes, and
balances, so you can see why we need types.
I thought it would be good to have this facility once and for all
rather than ad-hoc, but can you see any problems with it? Maybe I
should just be using SQL?
---Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---