Boost logo

Boost Users :

From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-05-29 14:21:04


Nikolai N Fetissov wrote:

>>>>
>>>> Background:
>>>> I am/was planning to profile the thread libraries from boost and ACE.
>>>> During this experiment, I wish we had an interface class defined for
>>>> threads. Also, I wish boost and ACE had implemented those interface
>>>> classes. It would have helped someone like me profile different C++
>>>> libraries with ease.
>>>>
>>>> I was going through the header files of boost and I don't see a
>>>> interface classes being used. I am trying to understand was there a
>>>> conscientious decision made to not define them. I am trying to
>>>> understand the reason behind those decisions. It will help newbie's
>>>> like
>>>> me to understand C++ better and write better code.
>>>
>>> Amit,
>>>
>>> ACE and Boost are unrelated projects, and there's no universal
>>> thread "interface" to implement. This doesn't mean you can't
>>> design thin wrappers yourself for your experiment.
>>> Honest advise though - do not use ACE, even if you find it faster,
>>> which I very much doubt. Boost is a set of modern C++ libraries,
>>> pushing its way into standard C++, and developed by world experts;
>>> while ACE is dated, ugly, monolithic monster that forces you into
>>> wrong design choices.
>>
>> <rant>
>> Presumably, you:
>>
>> 1. Have your CV somewhere online, that lists some serious projects
>> done with both ACE and Boost.
>>
>> 2. Have a blog post or article that specifically names the
>> "wrong design choices" that ACE forces one into?
>>
>> If so, can you provide links to those?
>> </rant>
>>
>> I *don't* have direct experience with ACE, so I'm not going to defend it
>> here, and I also assume you have good reasons to criticise ACE, but your
>> email does not communicate them well. Calling a established project a
>> "ugly, monolithic monster" without good justification written down does
>> not seem a constructive, or fair, thing. Especially given that Boost is
>> fairly monolithic and fairly big, too.
>>
>> - Volodya
>>
>
> This comes from direct experience with ACE.

Good.

> The library is full of evil macros, deep inheritance
> trees, C-style casts, etc. It hurts to even look at the source.
> It was built around early weak compilers and it shows.

This all looks like style issues. Does it actually contain any design
issues that lead to buggy code, or make it more harder to write code.
Is all ACE functionality now present in boost?

> As for being monolithic - how about a single 5 MB shared library?
> All or nothing. With Boost I at least have a choice of what to
> build and what to link with.

That's just a different tradeoff. With ACE, you have 5MB of shared
library code. With Boost, you have unknown amount of headers included
into every translation unit, and then compiled into each of your
application. There's no hard data how much that is, exactly.

> Take a look at their docs - you'll understand:
> http://www.dre.vanderbilt.edu/Doxygen/5.6.5/html/ace/index.html
> As for wrong design choices - just pickup a copy of
> "C++ Network Programming" (either volume) by D. Schmidt, et al.
> and see if you can honestly recommend it to anybody.

I'll have trouble recommending certain parts of Boost, either.

> If you're so inclined, you can find my CV and rants at www.fetissov.org.

Thanks. Of course, mentioning that you've worked with ACE, and giving
specific (non-style) issues you've run into, would be better information
to OP.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net