Using a $ prefix is my fallback position. My proposal is predicated on the idea that the user is aware of the _ contract - i.e. they know they are using couchdb. I'm looking for a way to piggyback on the convention that such names are private or system names, and trying to avoid adding a new convention - e.g. using a $ prefix.
Are there particular technical considerations against such a property, or is it just a desire to avoid cluttering up the namespace? (Also, would it be preferable to move this conversation to the dev list?) Regards, /julian. On Fri, Oct 30, 2009 at 10:44 AM, Brian Candler <[email protected]> wrote: > On Thu, Oct 29, 2009 at 11:19:18PM +0000, Julian Goacher wrote: > > I think this is a slightly different use case though. The framework sits > as > > a layer between the user and the db; I don't want the user to wrap their > > data to use the framework. Rather, I want to annotate a user generated > > document with additional data - which is essentially what the existing > > underscored names currently do. > > I make the following observation: if you don't want to wrap the user's > object, then you must already have a contract with your user that the > object > they are storing must not have any property starting with an underscore > (because that would be rejected by CouchDB). > > So why not just extend this contract to say that they cannot have a > property > called $meta or meta_ or some other property name that you reserve? > > Regards, > > Brian. >
