incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@gmail.com>
Subject Re: Changing rev to _rev in view results (Was: Re: newbie question #1)
Date Mon, 29 Dec 2008 23:51:08 GMT
On Mon, Dec 29, 2008 at 3:38 PM, Antony Blakey <antony.blakey@gmail.com> wrote:

> How is it 'easier to work with'? How does using _id and _rev everywhere make
> it not easy? Surely it's not the difficulty of writing code?

I argued in IM with Jan, that having _id and _rev only appear with
prefixes in the context of a document, makes for a primitive type
system. Any JSON object with _id and _rev fields is a CouchDB
document. Where those same values appear elsewhere they are not
prefixed, and it's not a document.

I think it's nice that code which is designed to process documents
will hit a speed bump if it is passed view rows. Duck typing is a
fundamental advantage of JSON, and CouchDB's makes good use of it.
It's nice to know by looking if you have a document on hand.


-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message