Loading ...
Sorry, an error occurred while loading the content.

2700The lesser of two evils

Expand Messages
  • Martin Cooper
    Dec 19, 2011
    • 0 Attachment
      CouchDB uses an attribute named _rev to identify document revisions.

      var revision = doc["_rev"];

      gets me: ['_rev'] is better written in dot notation.

      var revision = doc._rev;

      gets me: Unexpected dangling '_' in '_rev'.

      Apparently I have no alternative but to specify either the 'sub'
      option (first case) or the 'nomen' option (second case) to keep JSLint
      happy. Yuck.

      So which is the lesser of the two evils? The descriptive name for the
      'sub' option is "Tolerate inefficient subscripting". Is it actually
      inefficient? Why?

      --
      Martin Cooper
    • Show all 2 messages in this topic