On Thu, Jan 20, 2011 at 8:59 AM, Robert Newson <[email protected]> wrote: > +1 on moving it to include/ though. > > The deeper in I get, the less OTP like couchdb looks to me... :) >
Where've you been? Britain? > B. > > On Thu, Jan 20, 2011 at 1:57 PM, Adam Kocoloski <[email protected]> wrote: >> I'd go a little further. I think CouchDB should have two include files: >> >> include/couch_db.hrl (I'd prefer couch.hrl but I think we might be stuck w/ >> this) >> src/couch_int.hrl (name is not important) >> >> The first one would contain all record definitions needed to interact with >> CouchDB from Erlang. The second would contain macro definitions and records >> that are not supposed to be exported. Moving couch_db.hrl to include/ would >> eventually allow other applications to point to couch_db.hrl using the >> -include_lib directive instead of specifying the absolute path to the >> header. Regards, >> >> Adam >> >> On Jan 20, 2011, at 8:29 AM, Benoit Chesneau wrote: >> >>> Actually we are using ?b2l/?l2b and some other macros to make the code >>> shorter and ease our development. All these macros are in the main >>> include file couch_db.hrl used everywhere in the code. >>> >>> Since this include will be likely used in CouchDB plugins created by >>> users, I would like to have these kind of macros separated in their >>> own include file. Something common in C world. The main reason is to >>> not pollute namesspacing in external plugins and let them import only >>> what they need, ie couchdb types/records. >>> >>> What do you think about it? Also, not related but maybe it could be a >>> good practice to enforce the use of these macros in all the couchdb >>> codebase like suggest filippe. >>> >>> Any thoughts ? >>> >>> - benoît >> >> >
