   boost
  Why is it that a lot of people here are fixated on boost? I also feel like a lot of us are almost being bullied into using it with this 'if you don't use it then you're stupid' attitude.boost seems like a great library with a lot of useful features that are implemented in an efficient way, and if you want to use it then great.The problem that i have with it is, although its written by a lot of cleaver people, the programming style is horrendous. And no, its not because i don't understand templates, its because looking at the code gives me a headache, and debugging code that uses it can be a nightmare.Personally i think its a great reference for doing-it-yourself, so that you can get an idea of what interface you need for certain features and how to go about implementing them. Once you've done this, you end up with a nice manageable codebase that you understand well enough to debug and use.There also has to be a reason why most game middleware companies don't use it, and i don't think that these companies could be shown up by a bunch of spotty nerds on a gamedev forum.But all of that aside, i really think that if someone doesn't want to use it, then they shouldn't be jumped on with 10 angry replies as to why you have to use it and why you'll never be a proper programmer if you don't.   
  Well,I haven't used boost very extensively,I only used shared_ptr,weak_ptr,shared_array,function,bind.And all this time I have never run into a problem with it and to be honest I have never looked at the boost source code.The syntax you use when your using boost is just the same when you are using std::vector or any other templated class so I don't think thats a problem either.   ;  There is some merit to your outlook; I agree, I have seen the "bully" mentality a few times, with regards to boost. You should really watch your analysis of the gamedev community as "spotty nerds", it's home to some of the industry programmers that you speak of.   ;  I never said that the usage syntax was bad, nor did i say that it was buggy. I said that the internal programming style is not particularly nice to follow, and that if your own code breaks, and you have to step into some boost code to help locate the problem, then you'll probably end up going gray long before your time. My main point was the bullying of gamedev users into using boost. As i said, if you want to use it then fine, but why try and force other people into using it? And on that topic, i like the way my user rating has dropped 14 points for merely mentioning this. It just helps to prove my point.   ;  Don't compare library code with application code. Library code generally:doesn't follow the YAGNI principle and is hence more complex by definitionis often written for different versions of the standardis often written to work around compiler bugs (you'll see many references to borland in boost)is often written to work with different compilers that sometimes don't implement standards correctly or which have vast restrictions or performance lacks w.r.t. c++ templatesFrom those points follow a lot of #define and #ifdef black art and sometimes seemingly redundant code, and a lot of confusion.Further:some boost headers are not human written at all, but rather generatedFor instance, look at at boost/tuple.hpp and the tuple-documentation.And yes, being a C++ and C template hag will help you a ton.[Edited by - phresnel on June 24, 2009 8:31:12 AM];Quote:Original post by thefries And on that topic, i like the way my user rating has dropped 14 points for merely mentioning this. It just helps to prove my point.Maybe you should handle yourself better next time.   ;  This will all be IMHO.Quote:Why is it that a lot of people here are fixated on boost?Much of the discussion on this forum relates to C++, and much of Boost is considered by many to be a defacto extension to the C++ standard library, so it makes sense that Boost would be discussed frequently, and that many would advocate its use over hand-rolled alternatives.Quote:I also feel like a lot of us are almost being bullied into using it with this 'if you don't use it then you're stupid' attitude.I think some of the frustration you sense stems from people avoiding Boost (and, for that matter, the standard C++ library) for reasons that are not sound. People seem to make a lot of assumptions about these libraries, and there also seems to be a lot of misinformation and a lot of misconceptions floating around about them. There are definitely valid reasons to avoid Boost or parts of the SC++L in some cases, but my own observation is that about 7 times out of 10, when someone says 'I won't use std::vector etc., etc.', it's because of something silly like not turning off iterator debugging in Visual Studio, or because someone they know heard from someone they know that 'std::vector is slow'. I think this can get kind of frustrating for some of the more experienced programmers on the boards, and as a result, their responses to these sorts of objections may get a bit terse at times. I wouldn't take it personally, though - on a forum such as this, you're bound to get rubbed the wrong way occasionally (and be exposed to opinions that you don't agree with).Quote:The problem that i have with it is, although its written by a lot of cleaver people, the programming style is horrendous. And no, its not because i don't understand templates, its because looking at the code gives me a headache, and debugging code that uses it can be a nightmare.C++ template code (and the errors it generates) can get pretty nasty, no question about that. I don't know that the Boost libraries are any worse in this regard than any other complex template-based library, or that the Boost coding style is particularly bad. My own view is that given how much easier Boost makes it to get things done in C++, any added difficulty associated with the code or with the error messages is well worth it. YMMV though.Quote:Personally i think its a great reference for doing-it-yourself, so that you can get an idea of what interface you need for certain features and how to go about implementing them. Once you've done this, you end up with a nice manageable codebase that you understand well enough to debug and use.I guess. Still, the fastest code to write and debug is the code you don't have to write or debug at all. So if there's already a solution available, why not use it?Quote:There also has to be a reason why most game middleware companies don't use it, and i don't think that these companies could be shown up by a bunch of spotty nerds on a gamedev forum.Big game development studios deal with many considerations that are largely or completely irrelevant for small indie projects, hobbyists, or even some professional teams, including but not limited to:1. Large amounts of legacy code.2. Limitations imposed by target platforms/compilers.3. Programmers who have been in the business for a while and are most comfortable with C, or C++ as 'C with classes'.4. Inertia (this is the way we've always done it).5. We already have our own foo/bar class, and it would be more economical/efficient to keep using it than to switch to Boost or the SC++L.In short, just because studio X doesn't use Boost doesn't mean Boost is bad or that you shouldn't use it. Conversely, just because studio Y uses Boost doesn't mean that it's the greatest thing ever and you must use it. It's just not that simple.Quote:But all of that aside, i really think that if someone doesn't want to use it, then they shouldn't be jumped on with 10 angry replies as to why you have to use it and why you'll never be a proper programmer if you don't.I think the best thing to do if you don't want to be 'jumped on' is to back up your arguments with sound reasoning. (Again, I think it's the lack of sound reasoning or supporting evidence that tends to prompt these sorts of replies.)   ;  I used to be a little suspicious of Boost myself a while back... Well, not suspicious as such, more "I can easily code my own simply, fast and efficient smart pointers myself thank you very much!" kind of attitude.Well now I'm a complete Boost enthusiast. I ran some timings on my own code and Boost and found that there wasn't much, if any, difference between them. Also, one of the major reasons why I wrote my own custom code was that I wanted full memory alignment throughout my smart pointer and smart array classes.Well... With a little tinkering, you can do this and more in Boost. It's so flexible that it seems almost anything is possible. Boost was written by people that understand just how specific coders can be and they've gone out of their way to produce highly flexible, easily customizable code that is well tested and highly optimized in the most crucial areas.Anyway, saying all that, I'm still glad that I wrote my own custom code to begin with. It's helped me to develop my coding skills further and has enabled me to appreciate and understand the inner workings of Boost more.Boost isn't for everyone and I certainly won't advocate that everyone MUST use it no matter what. People should feel free to use whatever they wish to use, but saying that, you really can't go wrong with Boost. Boost gave rise to the Standard Template Library (now formally part of the C++ language) and Boost continues to push the envelope of the language. So that said, Boost will always play an important role in the future development of the language.   ;  This may quickly become the flame war for the next generation ( similar to the using the STL vs. doing it myself threads ).  The reason so many people are proponents of boost is because it provides reliable, efficient and well tested "higher level" building blocks for C++ software.  Sure, the code is sometimes ugly; whether it be template craziness (have you seen CGAL by the way !!) or macro craziness, or something else entirely.  However, the code doesn't look that way because it's bad or because the developers are lazy.  Rather, as you might find in "Joel on software", "those are bug fixes".  Well, not all of them; some of them are compile time optimizations and template meta-programming.  However, a large portion of them are bug fixes to work around missing features and broken compilers.Another big boon of Boost is that it's particular semantics for many features are being adopted into the C++ standard.  Many of the developers/reviewers for Boost are also on the C++ standards board.  This means that using certain boost libraries gives you a window into the future of the C++ language.  Basically, what I'm saying is that people usually suggest using boost rather than writing it yourself, because it is usually a good idea.  The Boost implementations are usually robust, fast and well tested.  The Boost libraries work on a large variety of compilers and platforms.  Achieving this yourself, even for fairly "simple" libraries, is no small task.  That said, there may be certain, very specific, situations where writing something yourself is desirable; but that is the exception more than the rule.   ;Quote:Original post by CodeStormBoost gave rise to the Standard Template LibraryNo, it didn't. STL was developed at HP well before boost was founded.   