JohnnyStarr
Wizard


Group: Members
Posts: 953
Joined: Feb 14, 2009
|
#1 id:48459 Posted Jul 19, 2010, 8:29 am
|
Anyone prefer boost libraries to standard?
If so, could you give an example of what you like about it?
|
|
|
ralgith
Magician

Group: Members
Posts: 84
Joined: Oct 30, 2007
|
#2 id:48462 Posted Jul 19, 2010, 10:09 am
|
Truth be told, I've never used them as I've not yet had the time to go that in depth with any C++ program. Something I do intend to remedy eventually... but raising a child really puts a crimp in your free time for learning new things.
|
|
|
|
|
|
|
JohnnyStarr
Wizard


Group: Members
Posts: 953
Joined: Feb 14, 2009
|
#5 id:48480 Posted Jul 20, 2010, 7:30 am
|
Darien said: While it is a great library, I find that sometimes it can over complicate simple things.
I've sort of come to the same conclusion. I thought that BOOST_FOREACH might be interesting to use here and there, but
at the end of the day, it doesn't keep me from writing a lot of code. Plus, it took way to long to get it to work with the compiler, and yet I still get warnings.
The STL seems like enough to accomplish what I want to do with my ROM project, so it doesn't look like boost is the way to go for now.
|
|
|
|
|
Tyche
Wizard


Group: Members
Posts: 1,702
Joined: May 23, 2006
|
#7 id:48491 Posted Jul 20, 2010, 1:54 pm
|
JohnnyStarr said:Anyone prefer boost libraries to standard?
If so, could you give an example of what you like about it?
Boost doesn't overlap much with the STL, and most of the libraries are quite dependent on STL.
It used to be much easier to decouple a library you were interested in from the rest of Boost and use it.
I don't see it as any sort of replacement or alternative to C++ STL.
|
......................... Proud member of Team Hetero
 
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.
|
|
Kaz
Conjurer


Group: Members
Posts: 125
Joined: Oct 31, 2009
|
#8 id:48495 Posted Jul 21, 2010, 1:21 am
|
I find the Boost libraries essential in any modern C++ project.
|
|
|
JohnnyStarr
Wizard


Group: Members
Posts: 953
Joined: Feb 14, 2009
|
#9 id:48496 Posted Jul 21, 2010, 6:05 am
|
Kaz said:I find the Boost libraries essential in any modern C++ project.
Which libraries do you like most?
Could you give a brief example?
|
|
|
Noplex
Conjurer


Group: Members
Posts: 107
Joined: May 20, 2006
|
#10 id:48500 Posted Jul 21, 2010, 9:27 am
|
JohnnyStarr said:Kaz said:I find the Boost libraries essential in any modern C++ project.
Which libraries do you like most?
Could you give a brief example?
Boost.Thread, Boost.Array, Boost.Uuid, and shared_ptr. There are many others that I haven't used that I would plan on using, Boost.Factory, Asio, but require a little bit of fiddling to make sure you use them properly. I do not have much of an interest for Lambda, but apparently that is getting into the new standard as well.
|
|
......................... jb
Last edited Jul 21, 2010, 9:28 am by Noplex
|
|
Kaz
Conjurer


Group: Members
Posts: 125
Joined: Oct 31, 2009
|
#11 id:48505 Posted Jul 22, 2010, 4:38 am
|
JohnnyStarr said:Kaz said:I find the Boost libraries essential in any modern C++ project.
Which libraries do you like most?
Could you give a brief example?
With my current pet project, I've been keeping count: Asio, Bind, ConceptCheck, CallTraits, Foreach, Format, Function, Iterator, Lambda, Optional, ProgramOptions, SmartPtr, Signals, Spirit, StringAlgo, TypeTraits, Variant.
The most immediately useful is always Boost.SmartPtr. shared_ptr<> just takes so much hassle out of memory management. Asio is excellent for dealing with the sockets and more and more providing a general "tasking" abstraction. Variant is one I don't use so much, but was just the ticket in a particular region of the code (actually my telnet parser). Lambda is used mostly in unit testing callback mechanisms (such as Signals), where I use it to mock up a small function object that sets a couple of function-local variables if the callback was fired, which I can then query as part of the test.
My actual favourite is Spirit by far, mostly for sheer amazement value, as well as its utility (although the compile times suck).
|
|
|