From dev-return-11922-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Mon Sep 27 17:47:37 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 71354 invoked from network); 27 Sep 2010 17:47:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 17:47:37 -0000 Received: (qmail 96006 invoked by uid 500); 27 Sep 2010 17:47:37 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 95864 invoked by uid 500); 27 Sep 2010 17:47:36 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 95856 invoked by uid 99); 27 Sep 2010 17:47:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 17:47:36 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fdmanana@gmail.com designates 209.85.215.180 as permitted sender) Received: from [209.85.215.180] (HELO mail-ey0-f180.google.com) (209.85.215.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 17:47:30 +0000 Received: by eya25 with SMTP id 25so2040128eya.11 for ; Mon, 27 Sep 2010 10:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=x3R1Q+2kayh7tFNyqPel+gylVChKFfSno0EeaEjdxdc=; b=BBx49+nAwPNsNWGPkC7ir0+ndUuoBRqttrszf5ZKB1To+ervOssSRnKrhHoMBgIb1W 8cClR/RMabwwbGvAKk96fT9yzrbzWiARtZSsxihf6MSDDPGYPyjih92Y21brr1dLFaqg teqYK+pnXuO2xSBRr60hhPOUZZDaVJofmfC7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=B888bVoh0udf64yyAGyQeNhG68Mxv73CNOfCWWRmMlEO5johwHEfpZF9cHyzLMLlss XTPts1gN8Q2BgbQmYVyKoGseITnZpVDnAOS9sWiIpfXOF49D/aiJmGMdQ+i7TR6+7yZ+ yUdjxGbg8dwLIgIKIJxPagIexi/1mcSNeIccY= MIME-Version: 1.0 Received: by 10.213.105.82 with SMTP id s18mr178440ebo.46.1285609628718; Mon, 27 Sep 2010 10:47:08 -0700 (PDT) Sender: fdmanana@gmail.com Received: by 10.213.104.131 with HTTP; Mon, 27 Sep 2010 10:47:08 -0700 (PDT) Date: Mon, 27 Sep 2010 18:47:08 +0100 X-Google-Sender-Auth: MFqEy4x_kkbrmEzfx0cnT8o1s3Q Message-ID: Subject: adding new macro to couch_db.hrl From: Filipe David Manana To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I'm getting tired of typing couch_util:get_value(......). It also consumes too much horizontal space. It's probably the most used function from couch_util. I'm thinking of adding a new macro in couch_db.hrl, like: -define(value(Key, List), couch_util:get_value(Key, List)). -define(value(Key, List, Default), couch_util:get_value(Key, List, Default)= ). Or maybe naming the macro just "get". Anyone against it? cheers --=20 Filipe David Manana, fdmanana@gmail.com, fdmanana@apache.org "Reasonable men adapt themselves to the world. =C2=A0Unreasonable men adapt the world to themselves. =C2=A0That's why all progress depends on unreasonable men."