Subject: Re: [boost] [transaction] New Boost.Transaction library under discussion
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-01-28 19:08:04


----- Original Message -----
From: <strasser_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, January 28, 2010 11:21 PM
Subject: Re: [boost] [transaction] New Boost.Transaction library under discussion

>
> I was on a long train ride today so I started putting together an
> initial code base for Transaction.
> and as always, the most obvious problems were overlooked:
> we have to find another name for the library/namespace, or for the
> transaction class:
>
> namespace transaction{
> class transaction;
> }
>
> using namespace boost;
> using namespace transaction;
>
> int main(){
> boost::transaction::transaction tx; //namespace spec required
> }
>
> I don't think this is acceptable, and I'd like to keep the name
> "transaction" for the transaction class. I've seen someone use
> "transaction_scope" instead but I don't think that makes sense.
>
> any ideas for a namespace?

transactions?

> also, would you like to make the usage of the transaction library by
> the individual libraries transparent to user wrt to namespaces?
>
> e.g.
>
> namespace persistent{
> using namespace transaction;
> }
> namespace stldb{
> using namespace transaction;
> }
>
> on the one hand it's easier for the user. a beginner using only one of
> the transactional libraries isn't bothered with only one simple class
> being part of another library, from his perspective.
>
> downsides on the other hand:
> - headers. you'd have boost/persistent/transaction.hpp,
> boost/stldb/transaction.hpp, ... and all they'd do is include
> boost/transaction/transaction.hpp and a "using" declaration.
> - it might be confusing that
> is_same<persistent::transaction,stldb::transaction>::value==true

Well, this do not concerns Boost.Transaction. From my side, I would let stm::transaction to refer to the single-phase transaction for STM. Some users can prefer to depend on only one library on particular contexts. Of course you can do it for Boost.Persistent.

Best,
Vicente