MudBytes
Pages: << prev 1 next >>
boost
JohnnyStarr
Wizard






Group: Members
Posts: 953
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#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

Go to the bottom of the page Go to the top of the page
#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.

David Haley
Wizard






Group: Members
Posts: 7,783
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#3 id:48463 Posted Jul 19, 2010, 11:22 am

I looked into boost a few times but never really got into it. Every time I tried, I kept thinking to myself that it was C++ trying very hard to be Python/Lua/Ruby, and still having its high-ceremony syntax. If I had need to write a very high-performance application, I might try harder, but honestly I've not found justification for it yet.
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Darien
Sorcerer






Group: Members
Posts: 452
Joined: May 31, 2006

Go to the bottom of the page Go to the top of the page
#4 id:48478 Posted Jul 20, 2010, 6:37 am

I use the boost libraries in my graphic game development, and even then I don't use it that much because of complexity issue's.  While it is a great library, I find that sometimes it can over complicate simple things.
.........................
rm * /bin/laden

My personal Blog          Follow me on Twitter:                      @ZombieBoots
Sandstorm's Website!  Follow my mud on Twitter:                @CombatMUD

Coder / Writer of Sandstorm : The realm of Sand and Magic
I used to be a troll, but then I took an arrow to the knee.

JohnnyStarr
Wizard






Group: Members
Posts: 953
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#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.

Davion
Idle Hand






Group: Administrators
Posts: 1,537
Joined: May 14, 2006

Go to the bottom of the page Go to the top of the page
#6 id:48482 Posted Jul 20, 2010, 7:39 am

I've fiddled with boost in the past, and I generally enjoyed it. I found it a bit overcomplicated for what it accomplished. But I must say, if I had to choose between the raw Python API and boost::python, I'd take the boost lib any day of the week. It lets you embed python with around 1/10th the code it'd normally take.
.........................
http://mudbytes.net/mudbytessignature-davion2.png

Tyche
Wizard






Group: Members
Posts: 1,702
Joined: May 23, 2006

Go to the bottom of the page Go to the top of the page
#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
http://jlsysinc.gotdns.com/ladybug_laugh2.jpghttp://jlsysinc.gotdns.com/teensymud_250x80.pnghttp://jlsysinc.gotdns.com/palin_calendar.jpg
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

Go to the bottom of the page Go to the top of the page
#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

Go to the bottom of the page Go to the top of the page
#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

Go to the bottom of the page Go to the top of the page
#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

Go to the bottom of the page Go to the top of the page
#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).

Pages:<< prev 1 next >>

Valid XHTML 1.1! Valid CSS!