[Clam-devel] Re: [Acustica-Bm] boost & clam

Hernán Ordiales h at ordia.com.ar
Wed May 13 19:42:11 PDT 2009


about the macro itself, maybe we can consider to only add something
like this to avoid the dependencies problem:

#define foreach(m_itname,m_container) \
       for( typeof(m_container.begin()) m_itname=m_container.begin() ; \
       m_itname!=m_container.end() ; \
       m_itname++ )


about the dependencies discussion, i think clam already has a huge
list of dependencies, so another one could not hurt more than now. I
think the decision should be based on other things like code
understandability or consistency. For example, I'm not a boost expert
but i think if you program with boost you have "a way" to do any
little thing and that is very useful when you start a project from
scratch, but clam already has lot of lines of code and design with
other style (call it "clean c++") that generates a risk of ending
having a lot o mixed code with different approaches (take smart
pointers vs reference model just as example) this could be a big mess
for everyone but even worst for new users/developers. So i think is
risky decision, unless a lot of effort in update all the framework to
do all in the "boost way" happen.

just as a said note, i'm using boost.python to do the clam bindings (pyCLAM)

On Mon, May 11, 2009 at 7:03 PM, Xavier <xavier at amatriain.net> wrote:
> As much as I love boost I am not sure we want to get CLAM into yet more
> dependencies.
>
> There are many more benefits to boost than just a prettier syntax and CLAM
> could benefit from them
> in several places. But this would make things even harder in terms of (1)
> dependencies and (2) understandability of
> compilation error (I use boost daily and I have to scratch my head many
> times when I get a compilation error:-)
>
> That said... it's a good discussion: let's hear other opinions.
>
> X
>
>
> David García Garzón wrote:
>>
>> Let's move this discussion to the clam-devel list. Hope you are already
>> subscribed, Dirk.
>>
>> On Monday 11 May 2009 15:17:39 dirk at code-shop.com wrote:
>>
>>>
>>> Small question,
>>>
>>> I see a lot of:
>>>
>>> for (std::list<ProcessingAndGeometry>::const_iterator
>>> it=sourcesAndGeometries.begin(); it!=sourcesAndGeometries.end();it++)
>>> {
>>>
>>> which is quite verbose (and it ought to ++i when incrementing iterators)
>>>
>>> boost has a macro BOOST_FOREACH to hide this:
>>>
>>>    std::string hello( "Hello, world!" );
>>>
>>>    BOOST_FOREACH( char ch, hello )
>>>    {
>>>        std::cout << ch;
>>>    }
>>>
>>> Would it be possible to add bits and pieces of boost to clam? (Taking
>>> care not to introduce a lot of dependancies off course)
>>>
>>> Same goes for the smart pointer and more small utilities ...
>>>
>>> Dirk
>>>
>>>
>>
>>
>> _______________________________________________
>> Clam-devel mailing list
>> Clam-devel at llistes.projectes.lafarga.org
>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>
>
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>



-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9




More information about the clam-devel mailing list