Re: I understand metadata now!

2011-03-25 Thread Alan
It's already possible, but metadata is the wrong tool. Wrap all return values that "might" have multiple values in a vector, and return/bind as many elements as you want. Add macros to make it less ugly, stir awhile, and you have multiple values. Using metadata for this purpose would have real pro

Re: I understand metadata now!

2011-03-25 Thread Joop Kiefte
Would it be possible to create something like CL's multiple values this way? 2011/3/25 James Reeves : > On 25 March 2011 10:41, msappler wrote: >> Never used metadata until now. >> >> I had an insight yesterday that I want to share with you: >> >> http://resatori.com/metadata-insight > > In my vi

Re: I understand metadata now!

2011-03-25 Thread Ambrose B
On Fri, Mar 25, 2011 at 11:48 PM, James Reeves wrote: > > (defprotocol Identifiable >(id [self] "Return an object's unique id")) > > (deftype DBRef [db-id data] >Identifiable >(id [_] db-id) >clojure.lang.IDeref >(deref [_] data)) > > (defn db-ref [id data] >(DBRef. id d

Re: I understand metadata now!

2011-03-25 Thread James Reeves
On 25 March 2011 10:41, msappler wrote: > Never used metadata until now. > > I had an insight yesterday that I want to share with you: > > http://resatori.com/metadata-insight In my view, it depends whether your :id key is a surrogate key or a natural key. Object metadata should not affect objec