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

The lesser of two evils

Expand Messages
  • Martin Cooper
    CouchDB uses an attribute named _rev to identify document revisions. var revision = doc[ _rev ]; gets me: [ _rev ] is better written in dot notation. var
    Message 1 of 2 , 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
    • Michael S. Mikowski
      i go with nomen.
      Message 2 of 2 , Dec 19, 2011
      • 0 Attachment
        i go with nomen.

        Martin Cooper <mfncooper@...> wrote:

        >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
      Your message has been successfully submitted and would be delivered to recipients shortly.