couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: adding new macro to couch_db.hrl
Date Mon, 27 Sep 2010 18:02:35 GMT
On Mon, Sep 27, 2010 at 1:47 PM, Filipe David Manana
<fdmanana@apache.org> wrote:
> 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
>
> --
> Filipe David Manana,
> fdmanana@gmail.com, fdmanana@apache.org
>
> "Reasonable men adapt themselves to the world.
>  Unreasonable men adapt the world to themselves.
>  That's why all progress depends on unreasonable men."
>

I'd vote for value or getval. I'm a bit hesitant about get because of
the overloading of the get bif.

Paul

Mime
View raw message