Slashdot Mirror


Boost 1.36 Released

AndrewStephens writes "Good news for C++ programmers: Boost 1.36 has been released with 4 new libraries (including very useful exception templates) and a host of updates. In particular, boost.asio (the cross platform AsyncIO library) has seen major additions and now supports asynchronous disk operations on Windows. Almost every modern C++ codebase uses Boost somewhere, and many of its features find their way into the official language specifications."

166 comments

  1. Good news everyone.... by Anonymous Coward · · Score: 0

    it's a suppository. C++ may as well be...

  2. Really appreciate it by amrik98 · · Score: 2, Interesting

    Boost made one of my cross-platform projects extremely easy to write; wrapping network functions to account for differences between Windows and Linux was not fun.

    1. Re:Really appreciate it by j00r0m4nc3r · · Score: 3, Insightful

      Easy to write? Yes. How about maintain? Every instance I've encountered Boost has been a nightmare. Boost tends to encourage the template swamp, that miserable wretched pile of crap which you end up with when people overuse templates and fail to properly comment their code. You can end up with some serious convoluted shit pretty easily with Boost. Eventually you learn it and can decipher it, but that means that every single person on the team, and all newcomers need to waste time getting up to speed on a single 3rd party library. 99% of the time people use Boost for things they really shouldn't just because it's there. It also tends to encourage over-engineering of systems because of the multitude of complex tools available. It's not to say that Boost isn't nice or has it's uses, but people should be very cautious in how they use it.

    2. Re:Really appreciate it by immcintosh · · Score: 2, Funny

      Programmer with new hammer sees lots of nails.

      - News at 11

  3. Now if only by Anonymous Coward · · Score: 1, Insightful

    they could get rid of the crappy_api_naming_conventions.

    1. Re:Now if only by 4D6963 · · Score: 3, Funny

      doYouLikeThatNamingConventionBetter OrEveThaNamCon?

      --
      You just got troll'd!
    2. Re:Now if only by smittyoneeach · · Score: 1

      CamelCase is for wikis.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    3. Re:Now if only by ampathee · · Score: 3, Insightful

      That's PascalCase. This is camelCase.

    4. Re:Now if only by krischik · · Score: 1

      That's PascalCase. This is camelCase.

      Nope: http://en.wikipedia.org/wiki/CamelCase

    5. Re:Now if only by shutdown+-p+now · · Score: 1, Troll
      The crappy_api_naming_conventions are those that are used for the C++ standard library itself - you know, "auto_ptr", "binary_search", "push_back", "basic_istream" etc. So naturally any library that presents itself as a natural extension of the standard one will use the same convention.

      Given that it's also the one used by many other languages (Python and Ruby use it for method and variable names, for example), I don't see what's wrong with it. As they go, it's pretty readable. If you really want to see a messy naming convention with no reason to exist save for being different, see Eiffel with its ALL_CAPS_CLASS_NAMES and Underscored_Pascal_Case_Methods.

    6. Re:Now if only by neokushan · · Score: 1

      Did you even read the link you posted?

      For clarity, this article will call the two varieties UpperCamelCase and lowerCamelCase. Some people and organizations use the term camel case only for lower camel case, and refer to upper camel case as Pascal case.

      --
      +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
    7. Re:Now if only by Anonymous Coward · · Score: 0

      they_are_equally_ugly, you insensitive clod.

  4. Slight exaggeration? by kriss · · Score: 0, Troll

    "Almost every modern C++ codebase uses Boost somewhere"? While I think it looks like a pretty useful set of libraries, I must admit that statements like this makes me less inclined to even look at it.

    1. Re:Slight exaggeration? by imbaczek · · Score: 4, Informative

      you'll be missing out, boost fixes lots, I mean LOTS of C++ deficiencies... at a cost of compile times and sometimes bogus compiler errors.

    2. Re:Slight exaggeration? by HappySmileMan · · Score: 3, Interesting

      A statement on /. makes you less inclined to look at a set of C++ libraries, I'm not quite sure how that logic works, has the statement made on /. somehow affected the quality of the libraries?

    3. Re:Slight exaggeration? by kriss · · Score: 3, Insightful

      Affecting the quality? Obviously not, but I won't stop you for being silly to try to make a point.

      I'm seeing a release blurb which looks more like an abbreviated commercial press release - including the mandatory "we're the market leader" claim - for a pretty uninteresting update. While this sort of stuff weasels its way into slashdot every now and then, the whacked out of reality claims definitely raises the bullshit-o-meter alarm.

      Allow me to demonstrate using the "Almost every modern uses somewhere" template:

      "Almost every modern streaming video server uses Windows Media Technologies somewhere"
      "Almost every modern web server uses PHP somewhere"
      "Almost every modern web design firm uses Dreamweaver somewhere"

      Do these claims affect the quality of whatever technology they're trying to push? No. Are the statements obviously overreaching? Yes. Does the fact that the recommendation (assuming they're attached to one in the first place) both push a product/tech and try to convince me that "it Must be Good since So Many Others use it (especially if they're 'modern')" make me less inclined to buy into the pitch? Oh yes.

      YMMV, of course.

  5. Use of Boost? by Anonymous+Brave+Guy · · Score: 3, Insightful

    Almost every modern C++ codebase uses Boost somewhere

    [Citation needed]

    Boost is created and used by a highly vocal minority of C++ supergeeks. You can play with the definition of "modern", but it's only been in the recent past that Boost even compiled on more than the bleeding edge platforms. Most of the C++ projects I've worked on professionally are still worrying about whether to allow non-trivial use of templates or how to avoid screwing up exceptions, never mind trying to fight through the mess that is getting Boost installed and running these days and spending time getting lawyers to review the licensing terms.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Use of Boost? by eddy · · Score: 3, Informative

      While I agree that it's a bit pissy to imply that if you're not using boost in your c++ project, you're not 'modern', neither installation nor license ought to be much of an issue. The license is as clear cut as it can be:

      Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

      The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

      C'mon, that ought to be pretty straight forward, even for a lawyer.

      It's been a while since I checked out a new version, but most of Boost didn't need installation since it's mostly include files with templates. You just put them somewhere and include them. Now, there are some libraries (regexp iirc) that need to be compiled, but it builds out of the box on gcc for me.

      --
      Belief is the currency of delusion.
    2. Re:Use of Boost? by Omnifarious · · Score: 1

      I consider that really sad. For the most part, since about 2004 or 2005 compilers have been perfectly fine for Boost. If most shops are still wondering about this, most shops are using dreadfully old development tools.

      That being said, I haven't done any really serious C++ development work since early 2006. I now consider C++ to be the language to go to when Python is just too slow for something. And for that there's Boost.Python.

      Though, I'm starting to get interested in intensive parallelization and Python is seriously lagging in good multithreading support.

    3. Re:Use of Boost? by Anonymous Coward · · Score: 1, Insightful

      [Citation needed]

      Boost is created and used by a highly vocal minority of C++ supergeeks.

      I'm anything but a c++ geek, let alone supergeek. I've basically read sections of stroustrup and done a few toy examples, and that's it. I have never done anything significant in either C or C++. But even I know about and have used boost. I don't really understand (or want to understand) all that "jam" stuff, but I just use the include-only stuff.

      As for compatibility, g++ has always worked ok for me.

      It's easy.

    4. Re:Use of Boost? by Anonymous Coward · · Score: 3, Insightful

      why is this bullshit even getting modded 5 Insightful? It's pure flamebait! Most half-decent compilers don't have problems with boost, the license consists of 5 sentences and .... how exactly can you screw up the installation of a mostly header-only library?

    5. Re:Use of Boost? by ucblockhead · · Score: 1

      Unless you are using one of the few parts of boost that require libraries, "installing boost" means copying it somewhere and putting a "-I" line that points to it in your build.

      The licensing terms are themselves hardly cryptic.

      --
      The cake is a pie
    6. Re:Use of Boost? by Anonymous+Brave+Guy · · Score: 1

      Most half-decent compilers don't have problems with boost

      Ah, the no true Scotsman argument.

      Unfortunately, the reality is that compilers outside of the mainstream ones like Visual C++ or GCC have only reached the level of support required for much of the wizardry in Boost relatively recently. If you're working on portable code and your project is more than a couple of years old, you are unlikely to have been able to use Boost when you started it.

      the license consists of 5 sentences

      That doesn't matter. In some businesses, including almost all large ones in my experience, any use of external software requires formal approval of the licensing terms by the legal staff. Just getting a lawyer to look at the damn thing is often more trouble than it's worth, and little details like the attribution can really mess things up if you are writing a library shipped as source yourself, because it may have implications that you have to pass on to your customers, which in turn is likely to make your lawyers throw a fit.

      how exactly can you screw up the installation of a mostly header-only library?

      But Boost isn't just headers these days, is it? Some of the most useful aspects of it require hoop-jumping to pre-build them.

      I'm sorry that you, and a couple of other people, seem to have assumed I was trolling. I wasn't. My comments are born of bitter experience using (or rather, not being able to use) Boost and other well-known libraries because of exactly the sort of technical and legal hurdles I alluded to. Moreover, when we looked into these things at the time, we found we were far from alone.

      In fact, I have never seen Boost used in an established commercial C++ product so far, though I'm aware that it has been considered in several projects I've been involved with. Heck, go look on Sourceforge, which even has a Boost page these days, and look how many of the C++ projects there use it. It's hardly "almost every" one, as the post I criticised claimed, and this is Sourceforge, where the level of enthusiasm and flexibility on the serious projects is probably significantly beyond what you get in your average coding shop.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:Use of Boost? by forkazoo · · Score: 2, Funny

      Boost is created and used by a highly vocal minority of C++ supergeeks. You can play with the definition of "modern", but it's only been in the recent past that Boost even compiled on more than the bleeding edge platforms. Most of the C++ projects I've worked on professionally are still worrying about whether to allow non-trivial use of templates or how to avoid screwing up exceptions, never mind trying to fight through the mess that is getting Boost installed and running these days and spending time getting lawyers to review the licensing terms.

      I'm glad I'm not the only one who doesn't think boost is everywhere. I mean, I used to. I thought I was the only one who wasn't using it, and that I must be missing out horribly. My projects were working fine, and I didn't really need boost, so I just accepted I was the only one not using it. Over time, I started to have the odd belief that I and everyone I talked to were the only ones not madly in love with template metaprogramming, and we (myself and everyone I know) were somehow simple minded abominations who just weren't clever enough to see how everything needed to be done with templates.

      That said, the threading API is conveniently portable to all the platforms I am likely to target with it, and saves me having to worry about platform specific details. So, I am slowly starting to move more and more in the boost direction.

    8. Re:Use of Boost? by ultranova · · Score: 1

      Unfortunately, the reality is that compilers outside of the mainstream ones like Visual C++ or GCC have only reached the level of support required for much of the wizardry in Boost relatively recently. If you're working on portable code and your project is more than a couple of years old, you are unlikely to have been able to use Boost when you started it.

      It is always risky using a non-mainstream compiler for a low-level language like C or C++. The advantage of such languages is that you get good control over details of program execution (such as memory management), but that also means that you have to take said details into account, and that in turn means that any differences between compilers are going to cause problems rather than be invisible implementation details.

      C is a bunch of macros over assembler. C++ is a bunch of macros over C. That's not flamebait, it's their whole point and the very reason they're still being used - well, the rational reason; but sadly, I've seen comments to the effect of "real men manage their own memory" offered as reasons to use low-level languages in things they're ill-suited to, such as network-facing servers/clients.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    9. Re:Use of Boost? by twatter · · Score: 1

      That doesn't matter. In some businesses, including almost all large ones in my experience, any use of external software requires formal approval of the licensing terms by the legal staff.

      Offtopic, but it just struck me how this is dismissed as FUD and fear mongering when the license in question happens the be the GPL.

      On topic now... I've never used boost, but I do have experience with STL and Crypto++. The last time I tried to 'install' boost (I needed the static libs) I couldn't pull it off. And I'm really not that bad. Maybe the process has simplified a bit now, but I wasted too much time to make it worth my while.

    10. Re:Use of Boost? by Anonymous Coward · · Score: 1, Interesting

      take a look at stackless python:
      http://www.stackless.com/

    11. Re:Use of Boost? by Omnifarious · · Score: 1

      Except that I don't think even the magic of stackless will give me the true multi-CPU concurrency that I want. :-(

    12. Re:Use of Boost? by shutdown+-p+now · · Score: 1

      You can play with the definition of "modern", but it's only been in the recent past that Boost even compiled on more than the bleeding edge platforms.

      Anyone who had seen Boost source code knows that there are plenty of old hacks and workarounds in it specifically to make it work (to some documented extent) on such archaic compilers as VC6 and g++ 2.95.

      Most of the C++ projects I've worked on professionally are still worrying about whether to allow non-trivial use of templates or how to avoid screwing up exceptions

      Sounds like the kind of people who might be surprised that C++ is already out of draft for some time, then.

      Oh, and I wonder - how do you "screw up exceptions"? It's an old, well-known, and well-documented mechanism, there are plenty of guides and recommendations on how to use it properly in general, and in C++ context in particular (RAII etc)

    13. Re:Use of Boost? by Anonymous Coward · · Score: 0

      the mess that is getting Boost installed and running these days

      Because typing "sudo apt-get install libboost-dev" is just so damn hard.

      (If you choose to use a platform without any decent package management capabilities, then maybe you should complain to the platform's vendor -- what are you paying them for, if not this kind of support?)

      and spending time getting lawyers to review the licensing terms

      It's a standard, trivial BSD-style license. If your lawyers can't just glance at it and immediately understand it, then either you need better lawyers, or you must be wasting an awful lot of time and money already because you clearly don't use any other BSD-licensed software already.

    14. Re:Use of Boost? by FunkyELF · · Score: 1

      How about Jython and use java.lang.Thread?

    15. Re:Use of Boost? by Anonymous+Brave+Guy · · Score: 2, Interesting

      Anyone who had seen Boost source code knows that there are plenty of old hacks and workarounds in it specifically to make it work (to some documented extent) on such archaic compilers as VC6 and g++ 2.95.

      Sure, but those are by far the biggest targets. How many little hacks were in there to support the native compilers on IBM, Sun or HP workstations, or even older Macs before GCC took off there?

      Sounds like the kind of people who might be surprised that C++ is already out of draft for some time, then.

      You judge too quickly. The problem isn't a lack of understanding; some of the people I'm thinking of are among the smartest C++ hackers I've ever met, the kind of people who have been following the C++ newsgroups since some way back into the last century, been to their fair share of ACCU conferences, even filed the odd defect report against the C++ standard. Rather, the problem is that what the standard says and what was actually portable without excessive effort across a wide range of compilers were worlds apart for such a long time (and I don't just mean export).

      Oh, and I wonder - how do you "screw up exceptions"?

      That's worth at least a blog post, if not a book, but I'm certainly not thinking of forgetting to enforce pairing of new and delete if that's what you're assuming.

      For one thing, this is a prime example of varying compiler support. Techniques are known for implementing exceptions with almost zero overhead unless they are actually thrown. However, those techniques have only been implemented in compilers relatively recently, and as usual the big names have been better at it for the most part.

      Then there's the little issue of retrofitting: techniques for working safely with exceptions weren't well known when the feature first became available, and a lot of projects got stung and then avoided them. That may have been a poor choice with hindsight, but retrofitting exceptions onto an existing project that wasn't written with them in mind is challenging, to say that least.

      And then of course, there's the fact that it's not always as simple as RAII in C++: there was some discussion on another forum recently about the sanity (or lack thereof) in the popping from a stack problem in C++, for example.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    16. Re:Use of Boost? by immcintosh · · Score: 3, Insightful

      Boost is created and maintained by, among other people, the people who created and maintained the C++ STL.

      If by "on more than the bleeding edge platforms" you mean "on something other than MSVC," then yes. Microsoft's compiler was tremendously shitty when it came to standards conformance until .NET 2003 edition (I believe). Not to mention that only applies to the more esoteric libraries (like lambda functions and spirit), and boost is quite modular so you could still use the parts that did work.

      never mind trying to fight through the mess that is getting Boost installed and running these days and spending time getting lawyers to review the licensing terms

      You're definitely a Windows developer, aren't you? You're just suffering from the fact that Boost isn't really built with or for MSVC, and the Windows development process is very non-standard with respect to every other OS out there. On my system installing boost is a process that consists of all the "mess" of executing ONE terminal command ('pacman -S boost' and when it gets done Boost is installed and ready to use).

      As for the licensing terms, this is the boost software license. It is three (short) paragraphs long. Stick to the libraries that are covered by that license (most of them) and you won't have any trouble. If you need more libraries than that, I'm not aware of any that have meaningfully complex licenses.

      Should I mention the fact that boost is the code base for much of the additions to the next generation of the C++ STL? I know templates can be big and scary, but really...

    17. Re:Use of Boost? by jgrahn · · Score: 1

      I consider that really sad. For the most part, since about 2004 or 2005 compilers have been perfectly fine for Boost. If most shops are still wondering about this, most shops are using dreadfully old development tools.

      Not every environment looks like yours.

      Where I live, 2005 is very recently, and compilers which were bleeding edge then are still not the only ones we use. God knows how old Sun's compiler is, or what kind of commitment they have to the C++ language ... I'm happy if I can work with a code base which uses the C++ standard library -- and that's more than ten years old.

      I'd like to use Boost some time (particularly regexes and the PRNGs) but introducing that extra dependency isn't always worth the effort, and it's not always fair to your coworkers.

    18. Re:Use of Boost? by Omnifarious · · Score: 1

      If I considered Java to be a worthwhile programming language at all, that might be an option for me. As it is, I largely consider it the language of large flailing IT shops inside organizations that largely have no clue.

    19. Re:Use of Boost? by Anonymous+Brave+Guy · · Score: 1

      Boost is created and maintained by, among other people, the people who created and maintained the C++ STL.

      Well, yes and no. Although Boost was begun by members of the C++ Standards Committee Library Working Group, participation has expanded to include thousands of programmers from the C++ community at large.

      And of course, the STL was originally developed independent of C++ by Alex Stepanov and Meng Lee. When Stepanov was first throwing around the underlying ideas, C++ didn't even have templates yet.

      If by "on more than the bleeding edge platforms" you mean "on something other than MSVC," then yes. Microsoft's compiler was tremendously shitty when it came to standards conformance until .NET 2003 edition (I believe).

      Your prejudice is showing. Visual C++ has pretty consistently been among the most standard-compliant compilers since forever. It fell behind a little in the early 2000s, since VC++6 was actually released before the C++ standard was finalised, but remember that we're talking about the GCC 2.95 days there, and the average UNIX platform compiler wasn't even on the chart at that point.

      You're definitely a Windows developer, aren't you? You're just suffering from the fact that Boost isn't really built with or for MSVC, and the Windows development process is very non-standard with respect to every other OS out there.

      Irony #1: My C++ code probably gets compiled on more platforms than code written by most, maybe even all, of the other participants in this discussion.

      Irony #2: While Windows may be the "odd one out" relative to the Linux world, the Visual C++ command line compiler and makefiles pretty much work like every other platform.

      Irony #3: Visual C++ is the only compiler on which I have actually seen real world code that makes extensive use of Boost compile properly out of the box.

      As for the licensing terms, this is the boost software license. It is three (short) paragraphs long.

      It doesn't matter what it says. There is a licence, which imposes a restriction. That in itself it enough to trigger a need for approval by the legal people in many companies.

      Should I mention the fact that boost is the code base for much of the additions to the next generation of the C++ STL? I know templates can be big and scary, but really...

      Do you think adding substandard lambda expressions and a funky parser library using template wizardry are more important than providing, say, standard facilities for working with networking, database interaction, heck, even console I/O? This is what the C++ in-crowd have brought us: an emphasis on using clever tricks to provide facilities that still aren't as good as what numerous other languages do anyway, instead of plugging gaping holes in the basic provisions of the standard library. I don't have anything against templates (well, not on this scale, anyway) but I do have a big problem with directing an entire development community's efforts towards overcoming mostly self-made problems with templates and the rest of C++ rather than getting the basics into the state they should have been in ten years ago.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    20. Re:Use of Boost? by immcintosh · · Score: 1

      Well, yes and no. Although Boost was begun by members of the C++ Standards Committee Library Working Group, participation has expanded to include thousands of programmers from the C++ community at large.

      Absolutely. It's good to have more people contributing.

      Your prejudice is showing. Visual C++ has pretty consistently been among the most standard-compliant compilers since forever. It fell behind a little in the early 2000s, since VC++6 was actually released before the C++ standard was finalised, but remember that we're talking about the GCC 2.95 days there, and the average UNIX platform compiler wasn't even on the chart at that point.

      This has not been my experience, having owned Visual C++ from version... 1.5 I think (one of the earlier ones)... until the .NET 2003 edition. Also GCC, Borland, Intel and Watcom (alas Watcom, you were good while you lasted). If you have some sort of regression testing available for various editions of the major compilers throughout time, I'd be interested.

      Irony #3: Visual C++ is the only compiler on which I have actually seen real world code that makes extensive use of Boost compile properly out of the box.

      Hello Mr. Hyperbole. You'll notice I never said anything about Visual C++'s current standards compliance; the later versions are absolutely quite good. There was a long stretch though where it needed a LOT of workarounds to get more esoteric things to work. Then again, I for one have personally used most of the more esoteric features of Boost in VC++, GCC, and Intel compilers, and can't recall any of them having trouble out of the box in any reasonably current state. Maybe if you're using old compilers?

      Irony #1: My C++ code probably gets compiled on more platforms than code written by most, maybe even all, of the other participants in this discussion.

      Awful big assumption. Not to mention the point under discussion was the development process, not platform targets.

      Irony #2: While Windows may be the "odd one out" relative to the Linux world, the Visual C++ command line compiler and makefiles pretty much work like every other platform.

      No argument here. It does. The problem is that Boost wasn't really built with the Windows command line in mind, which is why installing and configuring it on Windows is so much more difficult than about any other platform.

      It doesn't matter what it says. There is a licence, which imposes a restriction. That in itself it enough to trigger a need for approval by the legal people in many companies.

      Ah, okay then. So your problem is simply with using any kind of third party library at all? It doesn't get much simpler than the Boost license.

      Do you think adding substandard lambda expressions and a funky parser library using template wizardry are more important than providing, say, standard facilities for working with networking, database interaction, heck, even console I/O?

      You know, contrary to apparently popular belief, Boost is not all esoteric template metatrickery. It provides a large number of more basic features, just like you seem to want. It recently gained a very nice cross-platform networking library for example. Also there's a good basic filesystem access library. Threading too. Actually there's a bunch of this kind of stuff. So yeah, I'm not sure I get your complaint. And don't downplay the usefulness of a declarative EBNF style parser. I've found it immensely useful as a general purpose solution for parsing just about anything using almost an order of magnitude fewer lines of code than any other solution I've come across.

      As for databases and console I/O, those are really very platform/solution dependent things. I'm not sure to what degree a general purpose library would even make sense.

    21. Re:Use of Boost? by Anonymous Coward · · Score: 0

      how exactly can you screw up the installation of a mostly header-only library?

      Somewhere in the mostly part, I presume :)

    22. Re:Use of Boost? by HalWasRight · · Score: 1

      It is always risky using a non-mainstream compiler for a low-level language like C or C++.

      Unfortunately if you are using one of the dozens of 32 bit processor architectures out there which are not x86, Power, ARM, or MIPS, then you are likely using a non-mainstream compiler.

      --
      "This mission is too important to allow you to jeopardize it." -- HAL
    23. Re:Use of Boost? by itabrez · · Score: 1

      I have never seen Boost used in an established commercial C++ product so far[...]

      Have you seen this? http://beta.boost.org/users/uses_shrink.html

      go look on Sourceforge[...]

      Do you know how much time Debian guys spend in testing every new release of C++ Boost to make sure that it works well with all the Debian applications that depend on it?

    24. Re:Use of Boost? by ultranova · · Score: 1

      Unfortunately if you are using one of the dozens of 32 bit processor architectures out there which are not x86, Power, ARM, or MIPS, then you are likely using a non-mainstream compiler.

      That's okay. The differences between endianess, width of various data types, etc etc. would get you anyway if you try to simply reuse nontrivial x86 C/C++ code non-trivial on other architechtures.

      C and C++ are too low-level to be easily portable. That's the price of doing things close to hardware, besides undefined behavior if you make any mistakes of course.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    25. Re:Use of Boost? by Anonymous+Brave+Guy · · Score: 1

      The differences between endianess, width of various data types, etc etc. would get you anyway if you try to simply reuse nontrivial x86 C/C++ code non-trivial on other architechtures.

      How do you figure that? C was created to be a portable assembly language. I haven't seen a lot of horror stories about porting C code written for 32-bit machines to 64-bit platforms in recent years. What differences do you think are difficult to overcome?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    26. Re:Use of Boost? by Jack+Greenbaum · · Score: 1

      You would not believe how much code in the world assumes either that sizeof(int) == sizeof(long) == sizeof(void*), or that sizeof(long) == 4.

  6. Boost epitomizes everything that is wrong with C++ by Anonymous Coward · · Score: 4, Insightful

    Boost is a great example of what a bloated, backward language C++ has become. It relies on complex intricacies from the standard that are difficult for compiler writers to implement correctly and robustly and without bugs. As a result, Boost itself is not very portable. Either it works on your platform and compiler, or it sort of works, or it doesn't.

    Boost--and template metaprogramming in general--is a great exercise in intellectual masturbation. They identified a bunch of useful functionality that isn't supported by the language. Rather than design a new language that does support that functionality, or build external tools to provide it, they contort the template semantics of the language in order to try and squeeze that functionality out of nothing.

    Well, template metaprograms are crap. They're nigh undebuggable, they produce unreadable error messages, they take forever to compile, and most C++ programmers don't know how to write (or even read) their implementations. They're an abomination.

    Since meta-programming is clearly useful, and something that a lot of programmers want to do... why not add true compile-time metaprogramming support to C++ (or better yet, develop a 10x simpler and cleaner language and put proper compile-time metaprogramming support into it)? Templates are not a natural way to express metaprograms. Why not give C++ programmers the tools to write nice, clean, object-oriented, imperative metaprograms instead of the kludgy functional metaprograms they are forced to scrape by with now?

    Again: Boost exemplifies everything that's wrong with C++. All of the corner-case features of C++ that Boost exploits in order to provide useful and sane functionality in an insane way, should be removed from the language (or its successor). Instead, general and clean and low-level metaprogramming mechanisms should take their place so that the functionality embodied in Boost could be written directly by any mid-level programmer instead of an elite group of template wankers. :P

  7. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 5, Funny

    For a real laugh, read the parent replacing "C++" with "C" and "Boost" with "C++"

  8. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 1, Interesting

    Back in my day, we did metaprogramming the way god intended -- in the preprocessor, with recursive includes.

  9. Huh. I'm still using STL. by MostAwesomeDude · · Score: 3, Insightful

    Seriously. Boost lets you avoid maybe five lines out of every hundred at the lower levels, but that doesn't really improve performance, just make code less readable and more dependent on another library. If people wanna use Boost, fine, but not all "modern C++ codebases" use it or even like it.

    --
    ~ C.
    1. Re:Huh. I'm still using STL. by smittyoneeach · · Score: 2, Funny

      So, you've implemented a perly regular expression library in straight STL?
      Yuda man.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:Huh. I'm still using STL. by hr.wien · · Score: 2, Insightful

      Five lines out of a hundred? That's an awfully specific number for something as huge as Boost. I know I saved a lot more than that on not having to implement a complete cross-platform signals/slot implementation myself. Or a threading library. Or a parser for Unicode data files from scratch. Or a smart pointer implementation. Or a specific graph implementation with corresponding algorithms every time I need one. I could go on.

      Boost isn't about performance. It's about letting you get shit done instead of reinventing the wheel all the time.

    3. Re:Huh. I'm still using STL. by EWIPlayer · · Score: 1, Insightful

      For about the millionth time... Boost != STL. All you've accomplished by saying that is to state that you're an ignorant programmer whom the programming community is happy to leave behind... Let me pull you aside and give you a bit of advice - everyone else please turn away: If you say something's crap and then make it completely obvious that you have absolutely no idea what it is, you look like an idiot who can't even read through a website that isn't slashdot. And you don't want that.

      --
      This sig used to be really funny...
    4. Re:Huh. I'm still using STL. by MostAwesomeDude · · Score: 0

      Okay, here's what I use C++ for.

      - writing games

      And when using C++, I don't need:

      - regexps
      - signals and slots
      - smart pointers (Seriously? You can't check pointers yourself?)
      - graphs

      STL can, through std::locale, provide the Unicode services I need, and when I've got OpenAL doing threaded sound and ODE doing threaded physics, I've already got three threads and really shouldn't be popping open anything else.

      I do understand that people enjoy saying, "I has a massively powerful library." That's fine. I'm merely saying, "I don't need a massively powerful library, I just need to get shit done."

      --
      ~ C.
    5. Re:Huh. I'm still using STL. by MostAwesomeDude · · Score: 1

      Oh, and before I forget, you don't even need STL for PCRE as it has a native C/C++ binding.

      --
      ~ C.
    6. Re:Huh. I'm still using STL. by hr.wien · · Score: 2, Interesting

      smart pointers (Seriously? You can't check pointers yourself?)

      Soo, what happens to your game in case of an exception then? Always careful to clean up any allocated resources I assume? See, this is not a contest to see who can "handle" cleaning up memory himself. Any monkey can do manual resource management if he wants to. Personally, I just can't be arsed to twiddle pointers and exposing myself to memory leaks and other problems unless I have to. Not that I use manual memory allocation much at all.

      Anyway, my hobbyist game framework contains at least 4 of the features you mentioned (How on earth do you manage to make a game without having at least one graph in there?), and I'm damned thankful I didn't have to write the boring implementation details myself.

    7. Re:Huh. I'm still using STL. by cnettel · · Score: 1

      It's kind of sad when anyone states that graphs is a good example of what's not needed when writing games. I highly doubt that OpenAL keeps a core busy. It's not the number of threads that matters, it's whether you are actually saturating the CPU or not. And, well, smart pointers are never needed, but they are frequently nice, basically as soon as you might have otherwise wanted to write the cleanup code in multiple places (and that need includes exception handling, if you ever use that).

      For me, Boost has been a very useful way to get shit done, including to get a nicer STL-compatible allocator when the freeing strategy could be quite loose, but allocation overhead was all important. I could have got that done by rewriting the code to exclude STL completely, or by writing my own allocator. Using an already existing library was far faster. I am probably looking to use Boost serialization as the starting point for a similar reason now -- there is a codebase with a data hierarchy, that was never intended for state persistence. Rather than writing rather tedious specific code for each class*, or coming up with my own framework, I can reuse something pre-existing.

      * and, yes, it does get tedious if you really do error checking and handle the web of references that is really included here

    8. Re:Huh. I'm still using STL. by EWIPlayer · · Score: 1

      You don't use signals and slots when writing games? You know these are for events right? You don't have event based games? Wow. seriously... wow.

      --
      This sig used to be really funny...
    9. Re:Huh. I'm still using STL. by MostAwesomeDude · · Score: 1

      an exception

      A what?

      --
      ~ C.
    10. Re:Huh. I'm still using STL. by 19thNervousBreakdown · · Score: 2, Informative

      Hey, anyone else ever notice that games are, generally speaking, the buggiest, hackiest, most insecure pieces of software on a system? Other than spyware and "enterprisey" stuff, anyway.

      - smart pointers (Seriously? You can't check pointers yourself?)

      No, I can't, and neither can you unless you've found some way to replace your organic brain with a metal and wire positronic supercomputing device. Once you've managed that feat, you still have to overcome the impossibility of using exceptions properly without RAII. Stick to games.

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    11. Re:Huh. I'm still using STL. by shutdown+-p+now · · Score: 1

      smart pointers (Seriously? You can't check pointers yourself?)

      For one thing, lacking smart pointers (by which I mean at least std::auto_ptr or boost::scoped_ptr), there's no way to write an exception-safe class that performs any heap object allocation in constructor, and deallocation in destructor.

    12. Re:Huh. I'm still using STL. by shutdown+-p+now · · Score: 1

      STL can, through std::locale, provide the Unicode services I need

      It can, but it needs not, and there's no way to find out in a portable C++ code whether your host C++ implementation even has a Unicode locale at all, which kinds of them it has (UTF-8, UTF-16, UCS2...), and what are the names of those locales to load them. Nor do you get any guarantee that, in either the default or classic locales, wchar_t will be treated as Unicode codepoints by any locale-aware functions.

    13. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 0, Troll

      Confucius say "Man who don't need regular expression in C++ should not read compiler source code."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    14. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 1, Troll

      Confucius say "Man who has no smart pointers work as high-priced garbage collector."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    15. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 3, Funny

      I'm merely saying, "I don't need a massively powerful library, I just need to get shit done."

      Confucius say "Man who try to get shit done without library sit on pot with nothing to read."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    16. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 0, Troll

      Confucius say "Man who write games in C++ need Boost upside the head."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    17. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 0, Troll

      Confucius say "Man who write circular buffer with no smart pointers risk chasing his own tail."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    18. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 1

      Confucius say "Man with no signals and slots end up talking to himself indirectly."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    19. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 1

      Confucius say "Man who has maximum three threads and no smart pointers is master of indirection, but should practice sleight-of-hand."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    20. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 1

      Confucius say "Man with doesn't like new C++ libraries really going to hate new C++ standard."

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    21. Re:Huh. I'm still using STL. by Eluan · · Score: 1

      Okay, here's what I use C++ for.

      - writing games

      And when using C++, I don't need:

      - graphs

      Someone else addressed your other points, and I will address this one.

      Clearly you don't know how useful graphs are for writing bots. Especially when combined with space partitioning.

    22. Re:Huh. I'm still using STL. by imbaczek · · Score: 2, Insightful

      Every game more complex than pong will need everything you claim you don't need. Maybe you just don't understand your needs.

      regexps - configuration parsing
      signals and slots - game entities as properly isolated actors
      smart pointers - duh. we'll talk again when a dangling pointer hits you where it hurts the most.
      graphs - AI? pathfinding? don't really need those in games, do you?

    23. Re:Huh. I'm still using STL. by fotbr · · Score: 0

      regexps - configuration parsing

      Not always the best way. Might be your favorite way, but that doesn't mean it is always the best/only way to do it.

      signals and slots - game entities as properly isolated actors

      Useful, depending on the game, but a 3rd party engine will likely handle most of that for you.

      smart pointers - duh. we'll talk again when a dangling pointer hits you where it hurts the most.

      Sure, old-school pointers need more attention. Doesn't mean you *HAVE* to have "smart" pointers though.

      graphs - AI? pathfinding? don't really need those in games, do you?

      You don't need to write them in C++ if you're using some other middleware to do all that for you.

      In short, if you look at the way a lot of "game programming" is actually done, it is often a matter of writing glue and logic code to tie 3rd party game engines, 3rd party sound engines, 3rd party AI engines, 3rd party network engines, etc together.

      Continue your internet rant because someone has a different opinion of a library you like. I hadn't heard of boost (my work doesn't require c++ except on very rare occasions) until now, so I've got no real opinion on which is better -- I'm just trying to point out that what is good for some is not necessarily good for others.

    24. Re:Huh. I'm still using STL. by adonoman · · Score: 1

      Ummm, how do you think the smart pointers do it?

      class HeapAllocate {
            int *x;
      public:
            HeapAllocate() : x (new int()) {}
            ~HeapAllocate() { delete x; }
      };

      Of course if you want to do more than one allocation (of memory or any other resource) in a single class, then you'll have to have to use a smart pointer, or other RAII class for each one.

    25. Re:Huh. I'm still using STL. by LizardKing · · Score: 1

      I'd rather user PCRE. Written in clean and simple C and BSD licensed.

    26. Re:Huh. I'm still using STL. by immcintosh · · Score: 1

      And when using C++, I don't need:

      - regexps
      - signals and slots
      - smart pointers (Seriously? You can't check pointers yourself?)
      - graphs

      Man, you're missing out. BIG time. I write games myself for fun and I would probably cry if somebody told me I couldn't use signals or smart pointers anymore.

    27. Re:Huh. I'm still using STL. by Profane+MuthaFucka · · Score: 1

      Wow, someone actually took the time to blow their whole moderation load on these posts. Someone without a sense of humor. Probably one of my former sexual partners.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    28. Re:Huh. I'm still using STL. by smittyoneeach · · Score: 1

      Makes sense. The value of Boost::Regex is the natural C++ interface. I don't think there is a whole lot of substantial difference between the Boost license and BSD.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    29. Re:Huh. I'm still using STL. by imbaczek · · Score: 1

      Those four things are absolutely language- and boost-agnostic, it's just that boost implements them in C++. Using third-party libraries won't cover all the cases - I don't see how you could buy half-decent AI planners for a turn-based strategy, for example. Guess that depends on what kind of games you make.

    30. Re:Huh. I'm still using STL. by fotbr · · Score: 1

      I'm sure it depends on what type of games. For most "hardcore" games (ie, FPSs) there's middleware that will handle almost all the work for you. For other games, you're probably on your own. And for some games (think re-creations of 8-bit arcade games), you don't really need much at all.

      As I said, I'm not bashing boost, just pointing out that there are always multiple ways of doing things, and because someone prefers one way doesn't mean all other ways are wrong.

  10. Re:Boost epitomizes everything that is wrong with by HappySmileMan · · Score: 2, Insightful

    As a result, Boost itself is not very portable. Either it works on your platform and compiler, or it sort of works, or it doesn't.

    If you left this out you would've looked like less of a troll, seriously. Boost compiles with GCC4 (From 4.0.1 to the latest, on Mac, Linux and BSD), Intel's compiler collection (All OSes), Visual C++ (7.1 to 9.0Beta) and Borland.

    If it isn't cross-platform enough, I'd like to know what platform and compiler you use

  11. I've never used it by larry+bagina · · Score: 0

    I know there are some people with a huge hard on over it. I've looked into it a couple times but it seemed overrated to me. It might be a good source of template tricks, but that's about it.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

    1. Re:I've never used it by EWIPlayer · · Score: 5, Informative

      A lot of the other nay-sayers appear to be just useless trolls. You don't, so I'm going to reply.

      You're really selling boost and, by derivation, yourself short. Boost makes a ton of things simple and robust. I wrote the following, cross platform C++ code with boost:

      • asynchronous and robust TCP server in 80 lines of code - and it's decently configurable
      • a command line options parser that's truly extensible in about 60 lines of code.
      • a very solid threading model in about 100 lines of code
      • a synchronized and notification-based queue in about 50 lines of code
      • ... the list goes on for quite a while ...

      C++ is old and that means that it doesn't have anything like a modern language has. What it's missing, Boost fills in (not completely, mind you, but it does a really good job). With C++ you get speed and controllable code (C# runs a close second, but I still wouldn't write an OS in it), and with Boost you get a ton of ease back in the language as well.

      You're doing yourself a serious disservice by not looking into it. The one thing that I can't believe is that you really did look into it, and certainly not twice. If you did, you'd know it's not just a source of "template tricks"... far, far, far from it.

      If you're not using boost, I can guarantee you're reinventing the wheel... badly.

      --
      This sig used to be really funny...
    2. Re:I've never used it by Anonymous Coward · · Score: 0, Funny

      I wrote the following, cross platform C++ code with boost:

      • asynchronous and robust TCP server in 80 lines of code - and it's decently configurable
      • a command line options parser that's truly extensible in about 60 lines of code.
      • a very solid threading model in about 100 lines of code
      • a synchronized and notification-based queue in about 50 lines of code
      • ... the list goes on for quite a while ...

      All these are already implemented in Java, no need to even code them, just use them.

      Again, what is the real advantage of what's its name? Bust?

    3. Re:I've never used it by Anonymous Coward · · Score: 0

      C++ is old and that means that it doesn't have anything like a modern language has.

      Age is no excuse. Lisp is decades older than C++, but still manages to have all kinds of "modern" features that cause the uninitiated to become embarrassingly excited when they encounter distressingly-limited implementations of the same in Python or Ruby.

  12. Questionable negativity by Anonymous Coward · · Score: 1, Insightful

    What's happening? Are these people from commercial sellers of C++ libraries saying bad things about Boost?

    1. Re:Questionable negativity by Anonymous+Brave+Guy · · Score: 1

      Are these people from commercial sellers of C++ libraries saying bad things about Boost?

      Yes, absolutely. There is no possibility that someone simply has different experiences to you that have caused them to criticise something based on objective reasons. Anyone who disagrees with you must have a vested interest.

      It's not like I'm new here. Go ahead and check my posting history. You'll find I've got plenty of hours logged writing C++, and as surprising as you might find it, I do actually know what I'm talking about.

      Be a good chap and pick up the tin-foil hat on the way out, would you?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  13. The main thing missing, is introspection by Anonymous Coward · · Score: 3, Interesting

    The main drawback of metaprogramming via preprocessor is the same as metaprogramming via any external tool--lack of introspection.

    What you want is metacode that can be embedded in your normal C++ code, read by the C++ compiler, and can run with access to the AST or some other high-level representation of what the compiler has parsed. It should be able to read, interpret and modify the declarations that have already been parsed--generating new methods or typedefs on the fly, for example.

    The compiler knows things about your code: The sizes and alignment requirement of types, the offset of members, whether methods with a particular signature resolve or not, etc.

    Rather than funky template metaprograms which try to deduce these things by exploiting strange corner cases of the C++ standard, it would be nice if the metaprograms ran in a context where they had access to all of this information directly from the C++ compiler. It would be nice if the output of the metaprogram was source-code, too. (Much easier to debug that way, than by relying on obscure and cryptic error messages ala C++ templates). ..Of course, C++ is far too big and complicated for this to be done in a sane way. A much better bet is to design a new, smaller, cleaner language (aiming to have perhaps 10% of the complexity and 90% of the usefulness of C++). While you're adding metaprogramming in there, make some room for symbolic includes and a fast and robust incremental compilation system too. The textual includes of C and C++ are so backward its not even funny.

    1. Re:The main thing missing, is introspection by stephentyrone · · Score: 1

      As long as I can still implement an ALU in the preprocessor, I'll be happy.

    2. Re:The main thing missing, is introspection by certron · · Score: 1

      With all this talk of metaprogramming, I'm really surprised no one has mentioned Common Lisp.

      Then again, this is a post about a new version of a C++ library which seems to have devolved into a language gang war...

      --

      fair.org counterpunch.com truthout.com indymedia.org salon.com
      eff.org guerrilla.net debian.org gentoo.org
    3. Re:The main thing missing, is introspection by jonaskoelker · · Score: 2, Insightful

      What you want is metacode that can be embedded in your normal C++ code, read by the C++ compiler, and can run with access to the AST or some other high-level representation of what the compiler has parsed. It should be able to read, interpret and modify the declarations that have already been parsed--generating new methods or typedefs on the fly, for example. [...] it would be nice if the output of the metaprogram was source-code, too.

      So what you're trying to say is (use 'lisp)?
      (and
              (macros-run-on-ast-p 'lisp)
              (reads-decls-p 'lisp)
              (interprets-decls-p 'lisp)
              (modifies-decls-p 'lisp)
              (outputs-source-code-p 'lisp))

    4. Re:The main thing missing, is introspection by Anonymous Coward · · Score: 0

      => true

      But I'd still prefer to use scheme. I like

      (list? foo)

      more than

      (list-p foo)

  14. Ugh, Boost. by Anonymous Coward · · Score: 1, Funny

    Get thee behind me, foul creature of Satan!

  15. Re:Boost epitomizes everything that is wrong with by The+Snowman · · Score: 1

    Boost exemplifies everything that's wrong with C++. All of the corner-case features of C++ that Boost exploits in order to provide useful and sane functionality in an insane way, should be removed from the language (or its successor).

    Maybe that is why the next version of C++ will implement many of the features and libraries in Boost, but natively, avoiding some of the mental masturbation issues you mentioned.

    --
    24 beers in a case, 24 hours in a day. Coincidence? I think not!
  16. Re:Boost epitomizes everything that is wrong with by pla · · Score: 2, Insightful

    Rather than design a new language that does support that functionality, or build external tools to provide it, they contort the template semantics of the language in order to try and squeeze that functionality out of nothing.

    Wait - You actually mean to say you'd rather see an entirely new language appear to address mere oversights in an existing one, than extend the single most widely supported (in the sense of "used" and "dev tools exist on platform-X") language to do a few new tricks?

    As an aside, I don't use Boost. But if it does what I needed, you can bet the farm I'd use it rather than waiting for Programming-Language-Du-Jour support on a given platform... For a frame of reference, consider the classic comeback to the apologist's "but Java runs on so many platforms" argument: "And how did you compile the JVM?".

  17. Re:Boost epitomizes everything that is wrong with by Sentry21 · · Score: 1

    I use DJGPP in DOS, you insensetive clod!

  18. Are we talking about the same library? by benhattman · · Score: 2, Insightful

    I'm seeing tons of comments on this thread about how awful boost is and how all it does is cause global warming, start wars with middle eastern nations, and destroy the pristine beauty of C++. Huh?!?

    Yes, boost includes meta programming libraries, but it also provides a number of other useful and relatively basic features which truly are missing in C++. The shared_ptr class is one example that nobody thought to include in STL for some unclear reason. What if you want non-platform specific threading or date/time functions?

    If you aren't using boost, that's fine, but it is as excellent of a general purpose C++ library as we have available today.

    1. Re:Are we talking about the same library? by chrome · · Score: 3, Interesting

      I think the problem a lot of people have with Boost is not related to how good/bad it is; but rather the complexity in understanding it, and the level of complexity that it brings to your program.

      The problem as I see it is that if you're not one of the scary smart people that understands the way the boost developers think, then you will have problems integrating boost into your project, and debugging it when things go wrong.

      A lot of those problems will be due to your own ignorance but at the end of the day if something isn't obvious or at least well documented (and boost documentation isn't exactly a light read at the best of times) people will be turned off by how difficult it is, no matter how useful or speedy or good or whatever.

      I work with a scary smart C++ programmer who swears by boost. I primarily code in C, but he convinced me to write a project using C++ and boost to see how thoroughly useful it is.

      With boost, you can in very few lines of code, write code that can do impressive stuff. This is very true. But what you don't realise when you start out is that when you include boost::asio or boost::threads or whatever, you're including hundreds of thousands of lines of other people's code into your program, perhaps unnecessarily complicating it and making it so when you have a problem, you'll be staring at the debugger going "my code failed where?!" with a backtrace stretching back to infinity (and making Java Exception backtraces look NICE).

      Yes, reinventing the wheel is a bad thing, and should be discouraged. But what if you just need a simple wheel? A wheel that, I don't know, goes around and around. I don't need it to report on its air pressure, or self repair, or sprout wings and fly if I go off a cliff. I just need it to be .. a wheel.

      And boost tries to be the best possible wheel for every occasion. Its the wheel designed by the Borg. Assembled by nanites, it itself is made from nanits and will, whether you like it or not, assimilate your program into the Borg.

    2. Re:Are we talking about the same library? by chrome · · Score: 2, Funny

      whoops, replied to the wrong post. Oh well, this'll do :P

    3. Re:Are we talking about the same library? by topnob · · Score: 1

      Shit the Bord are real....

    4. Re:Are we talking about the same library? by Breakfast+Pants · · Score: 1

      >The shared_ptr class is one example that nobody thought to include in STL for some unclear reason.

      Thread-safety/performance tradeoff.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    5. Re:Are we talking about the same library? by benhattman · · Score: 1

      The philosophy of C++ has always been that you only pay a performance hit for the features you use. A shared_ptr class follows this rule of thumb accurately. It's a good reason not to use the feature (if you have code that cannot suffer that performance hit), but it is not a valid reason to exclude it from the standard implementations.

      Basically, STL is a "good start" towards a general library. Boost is here to help us get a little further.

    6. Re:Are we talking about the same library? by benhattman · · Score: 1

      I think this is the first boost complaint I've seen on this thread I would agree with. Some functionality in boost can be very difficult to understand, even if it is powerful. The date/time is one that I used recently and found less than intuitive.

      Most of this, however, is not a problem with the library, but rather a problem with the documentation. I find code that uses boost ends up being quite readable (assuming no metatemplate programming) however.

    7. Re:Are we talking about the same library? by shutdown+-p+now · · Score: 1

      With boost, you can in very few lines of code, write code that can do impressive stuff. This is very true. But what you don't realise when you start out is that when you include boost::asio or boost::threads or whatever, you're including hundreds of thousands of lines of other people's code into your program, perhaps unnecessarily complicating it and making it so when you have a problem, you'll be staring at the debugger going "my code failed where?!" with a backtrace stretching back to infinity (and making Java Exception backtraces look NICE).

      So, not any different from any but the most naive STL implementations out there.

      Here's the thing... if you use STL, then there's no reason not to use Boost. It's really just more of the same. And if you shy away from STL and templates, then why bother with C++ at all? If you want performance, there's C. If you want OOP, there's Objective-C. If you want a high-level language that's easy to read and hard to make mistakes in, there's Java and C# (and plenty of others).

      Having said that, the biggest problem with template metaprogramming "backtraces" (which are usually compile-time, really) is the late duck typing model of present C++ templates. With C++0x concepts, things will really be much better.

    8. Re:Are we talking about the same library? by Anonymous Coward · · Score: 0

      Yes, reinventing the wheel is a bad thing, and should be discouraged. But what if you just need a simple wheel?
      Then don't use boost, it's as simple as that. Nobody said you should use boost on every possible occasion, but once you actually do need a wheel with the kitchen sink, it would be stupid not to use boost. And it's not exactly brilliant to criticise boost for what it is: a bunch of libararies that is *meant* to be powerful and general.

  19. Re:Boost epitomizes everything that is wrong with by benhattman · · Score: 3, Insightful

    Well, template metaprograms are crap. They're nigh undebuggable, they produce unreadable error messages, they take forever to compile, and most C++ programmers don't know how to write (or even read) their implementations. They're an abomination.

    Since meta-programming is clearly useful, and something that a lot of programmers want to do... why not add true compile-time metaprogramming support to C++ (or better yet, develop a 10x simpler and cleaner language and put proper compile-time metaprogramming support into it)? Templates are not a natural way to express metaprograms. Why not give C++ programmers the tools to write nice, clean, object-oriented, imperative metaprograms instead of the kludgy functional metaprograms they are forced to scrape by with now?

    This isn't proof that template metaprogramming or even the boost implementation of it sucks. This is proof that you've seen some bad code written with that feature. So what? Get in line! I've seen rotten code written using too many macros, I've seen rotten code written using too many templates, I've seen rotten code written using too many classes.

    Basically, name a language feature, find some engineer who decides that feature is the final greatest achievement in programming, and then give him a year or so. He'll produce some awful, unreadable, undebuggable code.

    Personally, I find boost quite useful, and I have never used it to write template metaprograms (it has other features as well). I think they are cool, but I just haven't run into anything where I needed that kind of performance boost.

  20. Trolls are modded insightful? by EWIPlayer · · Score: 5, Insightful

    Why is it that all the trolls are modded up? People that think that Boost is the same as STL are insightful. People that think Boost is for C++ supergeeks are insightful. People that think Boost epitomizes what is wrong about C++ are insightful. Boost represents a serious set of genius level code and design and helps thousands of programmers that understand how good it is.

    I understand that trolls exist and that they will always be with us. I understand that ignorant people will continue to post until the end of time. What I don't understand is that the /. community apparently agrees with them. This is supposed to be a community of hard-core geekery that understand things like operating systems, and game programming, and the intricacies of complex, multi-paradigm languages likes C++. What I'm seeing here is that it's populated, in greater numbers, with ignorance and "I heard a sound bite from someone who doesn't know what they're talking about so now I know everything" kinds of people.

    Have a look at what you know and what you don't know and then think about how intelligent your opinion actually is, and then post. And when you're modding that post, do the same thing.

    --
    This sig used to be really funny...
    1. Re:Trolls are modded insightful? by Anonymous Coward · · Score: 1, Insightful

      Yeah, sorry. I'm a C++ geek myself. When I used Java to reimplement what we have been doing for 8 years and it only took us 6 months and the new beast run faster, I realized what a problem C++ really was. I moved into Java and never looked back ;-)

      C++ is going the way of PL/1, the best language ever, the language that IBM blessed as the language that would have all the features and only the smartest geeks could code in.

      Guess what? I have yet to find a geek who used or even who knows PL/1. By being such a complex language it drove itself into irrelevance. It doesn't matter if only the smartest geeks could use it, nobody younger than 20 knows about it and this has been going on for at least 20 years, so even geeks who are in their 40's have no idea it exists, therefore PL/1 is doomed to oblivion.

      C++ is headed the same way as PL/1. Please move on into Java and Haskell, or even better, learn Lex and Yacc and create your own languages.

    2. Re:Trolls are modded insightful? by EWIPlayer · · Score: 1

      You're comparing Java and C++ as though they have some sort of global comparison and you can now use Java for everything that you could use C++ for.

      That's deeply flawed.

      For some sort of argument like that you need to choose languages that are actually in the same space... perhaps C# and Java would be a better thing to look at if you want to play it that way. In my mind, C# is the choice nearly 100% of the time, from a language perspective over Java.

      C++ and Java are extremely different languages and can have very different places to play. The fact that you're making this blanket statement is a problem as you are equating them. Equating them like this is irresponsible and it indicates that you've missed something about both languages... they can't be compared like that. You missed something about C++. Perhaps a lot of somethings.

      --
      This sig used to be really funny...
    3. Re:Trolls are modded insightful? by testadicazzo · · Score: 1
      Thanks for that post. I've been scanning through the posts on this topic thinking "Why can't I have moderator points when I need them". I was formulating a similar post in my mind when I stumbled on yours. All of the anti-boost or anti-C++ posts can be tackled one-by-one, but who has the time, and what's the point? It's shocking what the modders have modded and how.

      My 2cents worth on the subject is this: Whenever you need to implement some code, it's worth seeing if there's a good library available that already does the job. The first place to look is Boost, because it offers some extremely useful stuff, it's well tested and well implemented.

      Templates and meta-programming is difficult, especially the debugging, but it results in extremely efficient code, and is a good way of extending the language. So isn't it nice that Boost guys have done all the difficult work for you? People complaining about having to learn another library are missing a significant point: Learning another library (or subset of a library) is no more difficult thant learning to use some custom made code, and your knowledge is more portable.

      All that said, Boost's documentation could be significantly improved. In some cases its fantastic, in others it can only be rated as good if you are using volume as a metric.

    4. Re:Trolls are modded insightful? by C_Kode · · Score: 1

      You just have to deal with it all just as they have to deal with you. You're dealing with an open community and when you deal with an open community you can people of all types. How many script kiddies do you think read /.? I would say lots of them.

      Here is the deal with /. moderation. It comes in two forms and all tags are Emotionally based except Interesting and Informitive. (sometimes even them!)

      1) Emotional Moderation: Someone says something they can relate too, so they moderate it up. Doesn't make it right, and it doesn't make you right. It's generally an opinion. Opinions are nor right or wrong, they are opinions and just like you, everyone has a right to have one even if you disagree. (All tags except Interesting and Informitive)

      2) Promotion of Relative Information: Your basic tag to help relative information float to the top. (The Interesting and Informitive tag)

      Yes, declaring a post flamebait or troll is an emotional reaction.

      The tag Informitive and Interesting tage can actually go both ways as the inital post could have been rhetoric. (opinion presented as fact)

      Now, it is in my opinion that both your and my post are offtopic! ;)

      Just like the newspaper, scan posts until you find something interesting to you. If you don't like it, skip it!

    5. Re:Trolls are modded insightful? by chthonicdaemon · · Score: 1

      One reason could be that Slashdot is populated by people who think Lisp or Haskell rock, together with people who think Perl/Python/Ruby rock and people who think no-one needs more than C (or assembly). Some of the people reading here write programs for phones or PICs. Many of them know many, many languages, have tried c++ and not liked it. Like me.

      The whole moderation system does not need consensus, just enough people who agree to get the score up to 5. In addition, the reason why more languages exist (other than c++, with or without boost) is because c++ does not solve the programming language problem.

      --
      Languages aren't inherently fast -- implementations are efficient
  21. Re:Boost epitomizes everything that is wrong with by AuMatar · · Score: 0

    Embedded compilers. Many of them don't support basic templates, much less all of Boost.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  22. Boost rocks your jocks by Anonymous Coward · · Score: 0

    Anyone that has taken the time to learn how to use boost::function and boost::bind will know that the boost libraries are brilliant. And that is only two of the many, many super cool additions boost brings to the table.

    Boo hoo the errors are too hard to read. Grow a brain, no one said coding in C++ was easy.

    Boo hoo it takes to long to compile. Get a quad-core, computing power is cheap.

    1. Re:Boost rocks your jocks by Anonymous Coward · · Score: 1, Funny

      So how does one go about buying a portal to this awesomely simple black-and-white world you apparently live in? It sure would make a lot of peoples' lives easier if they could live and work there too.

  23. Re:Boost epitomizes everything that is wrong with by ucblockhead · · Score: 1

    You'll only take boost/shared_ptr out of my cold, dead hands.

    --
    The cake is a pie
  24. Boost is a mixed bag by registrar · · Score: 5, Interesting

    I use C++ and Boost and like them. But it's a love-hate relationship. I mostly found the trolls to be insightful because they reflected that love-hate.

    C++ is a great programming language in the sense that English is a great natural language. Undesigned, piecemeal, weird idioms, and a pig to learn. But expressive, powerful, portable. Boost plays the role of "the King's English" -- it's a style guide. Sometimes arguable, sometimes wrong, but mostly very good at pointing out how to avoid deficiencies in the language. C, C#, Delphi, Objective C, OCaml, Mathematica and Python are unquestionably better languages than C++. And Esperanto is better than English. But I speak English and use C++ because it does what I need it to do better than any of the alternatives.

    Dealing with geeks is a problem for management to deal with. C++ is probably rightly the domain of ubergeeks. If you choose to use C++ because it suits your needs and your geeks like a bit of mental masturbation, good for you. No matter what language you use, your local geeks will push the boundaries. With C++, Boost mitigates the damage your geeks might cause when pushing boundaries (e.g. template metaprogramming). Boost is therefore a tool for managing geeks.

    The biggest problem with C++ and Boost is also their biggest asset. The language is too plastic. Every new library, object or template comes with a domain-specific-language that you just have to learn. For example, using functors to create threads. That is counter-intuitive and hard. But with Boost, each domain-specific-language tends to be well designed, so that if you understand C++, then Boost will push you into using the features in a way that is portable and safe.

    But an overwhelming gripe is that the online documentation is atrocious. In the sense of incomplete, unclear, impenetrable, useless examples, broken links, broken HTML, outdated. To the point where it becomes a good reason not to use Boost.

    1. Re:Boost is a mixed bag by registrar · · Score: 1

      I can't believe. I mentioned The King's English. In a post so embarrassingly badly written.

    2. Re:Boost is a mixed bag by Anonymous Coward · · Score: 0

      English is actually one of the easiest, if not the easiest language to learn.

    3. Re:Boost is a mixed bag by s73v3r · · Score: 1
    4. Re:Boost is a mixed bag by immcintosh · · Score: 1

      I mostly agree with you (well, entirely agree except for what I define as qualifying as a "better" language; I believe English is "better" than Esperanto just like I believe C++ is "better" in the general case than most other options). That said...

      But an overwhelming gripe is that the online documentation is atrocious. In the sense of incomplete, unclear, impenetrable, useless examples, broken links, broken HTML, outdated. To the point where it becomes a good reason not to use Boost.

      Really? I can think of many one or two times out of my entire history with the library where the answer to my question wasn't easily found. Actually, almost all of my gripes with the documentation are with the Fusion library; its documentation is pretty spotty when it comes to laying out how to actually DO the things I want to DO with the library (most other libraries demonstrate use cases that I find pretty germane).

    5. Re:Boost is a mixed bag by registrar · · Score: 1

      My complaints about documentation come because I'm a newbie of sorts, but not an idiot. I had the same experience as you, but with ublas... I could not figure out when to use which kind of sparse matrix. I have never used sparse matrices before, and didn't know what kind of matrix is appropriate, when. (Trial and error worked.) I could take a course on numerics, but an equally attractive alternative is to buy the Intel Math libraries and use their online documentation.

      The tutorials don't give a good lead into where to get started, they show what is possible but don't give introductions to the relevant concepts. The reference manuals usually have good coverage. Unfortunately they include only trivial examples, meaning that they are generally too simple to be instructive. (Maybe they are good for experts?) Boost.MPL and Boost.Python both are guilty of this.

      The boost build documentation is really lame. The source code is fortunately clear...

      My feeling is that the Boost developers have written the better documentation into books, rather than putting it on the web for free. I really support that, and I hope it works for them. I have ordered one of their books, and if it's good will buy more. That said, quality online documentation is a good reason to select a tool, and boost hasn't got it.

    6. Re:Boost is a mixed bag by registrar · · Score: 1

      Excuse the second reply...

      I mostly agree with you (well, entirely agree except for what I define as qualifying as a "better" language; I believe English is "better" than Esperanto just like I believe C++ is "better" in the general case than most other options).

      My point was that we don't argue about superiority of natural languages, even though we understand that they are very different and useful for expressing different things. You can't directly translate "manyana" into English, or "were to have been" into Hebrew.

      Awareness of what makes a language useful for a purpose is useful, and it is why C#, Mathematica and Esperanto great languages. The same awareness can be applied retrospectively to a language, and maybe you could say that Boost is to C++ as Dr Johnson was to English.

  25. Re:Boost epitomizes everything that is wrong with by setagllib · · Score: 2, Informative

    Boost targets implementations which actually implement the C++ standard, not subsets of the standard for embedded purposes. The whole point of Boost's advanced functionality is that templates are the only way to express it in C++, short of implementing an actual metalanguage on top of C++, which would be even more heavyweight and incompatible.

    --
    Sam ty sig.
  26. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 0

    You know, your rant looks like something I would write. But if I had written it, I would do so knowing that I'm ranting only because of my personal discomfort with it and not because Boost is in any way flawed. I think you are doing the same.

  27. Re:Boost epitomizes everything that is wrong with by tepples · · Score: 1

    Boost compiles with GCC4 (From 4.0.1 to the latest, on Mac, Linux and BSD)

    But MinGW for Windows appears to have been stuck on 3.4 for years. So if I'm on Windows, should I be using Visual C++ Express instead of MinGW?

  28. How Boost features could be worked into a game by tepples · · Score: 3, Insightful

    And when using C++ [to write games], I don't need: regexps

    Not even for parsing your game's preference file?

    signals and slots

    Not even for notifying game objects that things have happened to other objects?

    smart pointers (Seriously? You can't check pointers yourself?)

    Not even for disposing of a mesh and texture once no nearby game objects need it anymore?

    1. Re:How Boost features could be worked into a game by Anonymous Coward · · Score: 0

      ever heard of XMLs ? callbacks ?

      you have a good point on smart pointers, but that's easy to implement on my own, even in C ( without templates ).

  29. An exception by tepples · · Score: 1

    an exception

    A what?

    An exception is what the C++ standard library and your other libraries throw when they can't allocate memory for a game object, or they can't read a mesh, texture, map, wave, or music file from the disc, or a user-provided mesh, texture, map, wave, or music file is malformed.

    1. Re:An exception by andi75 · · Score: 1

      My other libraries return a null pointer. Writing your application in C++ is fine if you can handle the complexity, but please gives me a library with a C interface.

      --
      Writing myFoo->doStuff() is rarely better than writing foo_doStuff(myFoo)

  30. Re:Boost epitomizes everything that is wrong with by statusbar · · Score: 1

    actually that is a good question. Why is mingw version stuck in 3.4 when I'm running 4.2 on mac and 4.3 on debian lenny?

    does anyone know?

    --jeffk++

    --
    ipv6 is my vpn
  31. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 0

    Either it works on your platform and compiler, or it sort of works, or it doesn't.

    No room for doubt in this statement. You've just described white, black and all the greys in-between, but haven't specified any weight on these shades. "The associated statement is either true sometimes, true always, or true never" is a tautology—it's never false, regardless of the input.

  32. Re:Boost epitomizes everything that is wrong with by Flat5 · · Score: 2, Insightful

    Boost is not a "template metaprogramming" library, as you seem to be implying. It's just a good library that happens to use template techniques for some purposes for which it is very well suited, for example, the Spirit parser.

    You don't need to know template metaprogramming at all to use Spirit. In fact, what Spirit does is make the specification of parsers look like BNF but in C++ syntax. Internally, yeah, the library is awfully complex. But that is the point of a library - it implements once and for all difficult things so that library user's lives are easier. And boost achieves that goal nicely.

  33. Re:Boost epitomizes everything that is wrong with by Kickasso · · Score: 1

    Yes, a programming language with a clean, purpose-built metaprogramming facility would be extremely useful. But I think that doing it imperative style, as you seem to prefer, is a sure way to lose one's sanity.

  34. Re:Boost epitomizes everything that is wrong with by shish · · Score: 0

    For a frame of reference, consider the classic comeback to the apologist's "but Java runs on so many platforms" argument: "And how did you compile the JVM?".

    By writing a ton of platform-specific code, spending hundreds of hours debugging compiler specific problems because none of them support the standards in exactly the same way, and in general spending far too long worrying about the details when there's a bigger picture to be dealt with :-|

    ... this is a comeback to be used *against* java? o_O

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  35. Re:Boost epitomizes everything that is wrong with by sigmabody · · Score: 1

    Disagree, but not by a lot. I would say that boost emphasizes the aspects of C++ which both make it a powerful language, but also can make it a nightmare to understand. Boost is kinda like plugging into a nuclear generator: lots of power but very dangerous, and if you're not careful you'll spew radioactive garbage all over your code tree.

    The overall success of applying the tool depends on the skill with which it is used. In the hands of novices, boost can turn a normal program into an unmaintainable disaster. Used sparingly, clearly, and with good design, boost can, well, "boost" your ability to write good code.

    Yes, it would be cleaner if all the paradigms were in a new, clean, theoretical perfect language. However, for those people writing code now, C++ is pretty good, and boost can be a very useful addition in the right hands. Just be sure you know how to write good code before you start using it, and avoid any nasty explosions. :)

  36. No one dares to write a new language like C++ by master_p · · Score: 0

    Even the gurus (Stroustrup etc) don't dare think about a new language.

    I tried to use boost.bimap and my compilations got x10 slower. I then wrote my own bimap, with simpler interfaces of course, and compilation times got back to normal.

    One of the biggest problems in C++ is header files. I am surprised they do nothing for this. The slowness of compilation of boost programs comes from parsing and compiling the huge amount of code that lives in the header files.

  37. C++ with Boost versus Java by Anonymous Coward · · Score: 0

    For some sort of argument like that you need to choose languages that are actually in the same space...

    That's good advice, but you're missing something crucial: C++ and Boost are recommended by their diehard fans for application in almost *ALL* spaces, because of its very high-level facilities. As a result, the parent is right that Java can be directly compared with C++ and Boost, since there is a high degree of overlap in the claimed application domain.

    Of course, such a recommendation is sheerest nonsense, so those diehard fans are just fanboys, rather than intelligent users. Unfortunately, there are a lot of them, and that's why C++ with Boost gets such a bad name, and why the proponents of languages such as Java and C# frequently point out how they can do far better.

    That's the problem with having a high-level, versatile and highly capable library: it makes its less clueful users think that the application domain of the base language is now universal.

  38. Re:Boost epitomizes everything that is wrong with by Anonymous+Brave+Guy · · Score: 1

    Boost targets implementations which actually implement the C++ standard

    And how many of those are there, exactly?

    (As far as I'm aware, the answer to that question is still "one", and that one only fairly recently.)

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  39. Maybe they understand something you don't by Anonymous+Brave+Guy · · Score: 1

    I understand that trolls exist and that they will always be with us. I understand that ignorant people will continue to post until the end of time. What I don't understand is that the /. community apparently agrees with them.

    If you can keep your head when all about you are losing theirs... they probably know something you don't.

    You, and a few other posters who have labelled all the critical posts as trolls, seem to be assuming that those who make those criticisms are incompetent and/or uninformed. Why do you assume this? It is clear from the comments that many of the critics have used (or tried to use) Boost in various circumstances, and found it isn't the silver bullet so many of its advocates seem to make out. The criticisms I'm seeing of portability, compile-time performance, cryptic error messages, variable quality of documentation and the like are all fair.

    Ultimately, Boost is a bit of a strange beast. C++ has a lot of merit as a practical, pragmatic language where you can get stuff done, but it's not a high level language by contemporary standards. Unless you actually need the low level flexibility and/or seriously high performance, it's usually a bad choice for new projects. Boost seeks to add the sort of high-level functionality C++ lacks and to work around some of the more serious limitations of the underlying language, but it's like a scary parody of Greenspun's tenth. If you really need to use C++, it has its place (but at a cost), but for most people who need that kind of functionality, there are numerous much better ways to get it (or to avoid the need for it in the first place) by choosing a more appropriate programming language.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Maybe they understand something you don't by True+Grit · · Score: 1

      they probably know something you don't

      On the other hand, this is /. with open posting and open moderation, so they probably don't...

      Yea, I know they don't like C++/Boost, I don't expect everyone to like it, and I myself don't like every language/library out there either, but I don't bother *posting* that, and when I mod, I don't reward (or punish for that matter) statements of likes/dislikes that have no other redeeming value (and I reward only if I *know* that the "redeeming value" is factually correct & relevant). Sure some of the criticisms above have some redeeming value (eg, bad docs for some Boost components), but clearly not all of them (nor do I think the GP meant that all criticisms were trolls), and some of those got modded up too. I especially love the "insightful" comparison of C++ (compiled language) to Java (byte-interpreted, managed-code, major runtime environment required), yea, that was truly brilliant.

      But then I've come to expect this, since this is what you get with open posting and open moderation, where the trolls and script-kiddies get mod points too, but like the GP, I would swear the signal-to-noise ratio used to be a little higher around here, particularly on programming related topics. People still argued and disagreed (when have they not, people are peculiar that way!), but at least they generally knew something of the subject at hand, and made a half-way decent effort at logical arguments. Now we've got folks bitching about nothing other than a library's naming convention, or even better, comparing apples to oranges, and getting modded insightful... [sigh]

  40. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 0

    I had a look in the cygwin mailing list archives a couple of months ago and insofar I recall, the issue was basically that gcc 4 doesn't implement exceptions in a way that is compatible with windows DLLs and apparently it's a lot of work for the few hardcore cygwin hackers to implement the necessary support.

  41. Re:Boost epitomizes everything that is wrong with by hr.wien · · Score: 1

    VC++, GCC, Intel, Comeau... That's just off the top of my head. None of them are perfect, but they're close enough as makes no difference.

  42. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 1, Interesting

    Either it works on your platform and compiler, or it sort of works, or it doesn't.

    I find that to be the case with all software, everywhere.

  43. Set theory by krischik · · Score: 2, Insightful

    Did you even read the link you posted?

    For clarity, this article will call the two varieties UpperCamelCase and lowerCamelCase. Some people and organizations use the term camel case only for lower camel case, and refer to upper camel case as Pascal case.

    Yes I did. The main terms are UpperCamelCase and lowerCamelCase. CamelCase is for for both. PascalCase is just another word for UpperCamelCase.

    But I guess one can argue about the finer points for ever.

    Martin

  44. I iNsist by smittyoneeach · · Score: 2, Funny

    I iNsist oN tHe rIght tO uSe zAmbinian cAmel cAse.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  45. Re:Boost epitomizes everything that is wrong with by jfclavette · · Score: 1

    Honestly ? Yes. Microsoft's compilers output better code and, in my experience, are faster at compiling than GCC is. Various IDEs for Windows let you use the (free as in beer) Microsoft compilers with them, so I honestly have no idea why someone would want to use MinGW unless they relied on GCC-specific extensions.

  46. Re:Boost epitomizes everything that is wrong with by Darkfred · · Score: 1

    Well, template metaprograms are crap. They're nigh undebuggable, they produce unreadable error messages, they take forever to compile, and most C++ programmers don't know how to write (or even read) their implementations. They're an abomination.

    You are describing STL not boost. Boost fixes the majority of these problems. C++ has evolved since STL was developed. Now these extensions can be written using readable, and debuggable code, and they have, in boost.

    Any reasonably intelligent programmer should be able to understand most of the boost headers. And see why they are great. If you can't you should probably be working in another language. C++ is not C. Your arguments died over 20 years ago.

    --
    ----- 70% of all statistics are completely made up.
  47. Re:Boost epitomizes everything that is wrong with by mikael · · Score: 1

    Replace "C++" with "assembly language" and "Boost" with "C", and you will get a Readers comments reply from a 1978 edition of BYTE magazine.

    --
    Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  48. Re:Boost epitomizes everything that is wrong with by 3p1ph4ny · · Score: 1

    Which embedded platform are you on that has a C++ compiler? Most of them barely support the C standard.

  49. Re:Boost epitomizes everything that is wrong with by immcintosh · · Score: 1

    That comment was at least seven different kinds of awesome.

  50. Re:Boost epitomizes everything that is wrong with by immcintosh · · Score: 1

    Since meta-programming is clearly useful, and something that a lot of programmers want to do... why not add true compile-time metaprogramming support to C++ (or better yet, develop a 10x simpler and cleaner language and put proper compile-time metaprogramming support into it)?

    This confuses me greatly. Templates ARE true compile-time metaprogramming support. Perhaps just not exactly the design that you want? Contrary to what you seem to believe, things like partial template instantiation are NOT corner-case features and are very integral to the nature of templates. Admittedly, template syntax needs to be cleaned up a lot, but C++0x seems to be fairly on track for accomplishing a bit of that (meaningful compiler errors, yes please).

    Well, template metaprograms are crap. They're nigh undebuggable, they produce unreadable error messages, they take forever to compile, and most C++ programmers don't know how to write (or even read) their implementations. They're an abomination.

    The debugging problem, as I understand, will be largely fixed in the next iteration of C++, that's just an implementation detail. As for taking forever to compile, well can you point to a language that supports the kind of metaprogramming C++ can do (as in, metaprogramming that produces code equivalent in speed and function to manually coded versions; things like C# generics just wouldn't cut it in C++) and compiles quickly? I honestly don't know.

    A well designed template library can be a beautiful thing. I love using Spirit for non-trivial text parsing, for example; it's VERY straightforward and allows me to declaratively specify a text parser in just a few dozen lines of code in as close to direct EBNF grammar as you're likely to find possible in a general purpose programming language. The trick is just to isolate your parsing code in its own compilation unit and compilation speed isn't so much of a problem.

  51. Re:Boost epitomizes everything that is wrong with by KillerEggRoll · · Score: 1

    Oooh! I raise you an unholy combination of OpenWatcom and STLPort that barely works together for DOS targets.

  52. Ugh by Knuckler · · Score: 1

    Whoever designed Boost::ASIO has a fetish for the scope resolution operator.

  53. Re:Boost epitomizes everything that is wrong with by jgrahn · · Score: 1

    Which embedded platform are you on that has a C++ compiler? Most of them barely support the C standard.

    Don't most of them simply use gcc these days? (And some stripped-down Linux distro as an OS.)

    There's something called "Embedded C++" for compiler writers who need an excuse not to write a working C++ compiler, but I haven't heard of anyone who has used it.

  54. Re:Boost epitomizes everything that is wrong with by Poltras · · Score: 1

    VC++, GCC, Intel, Comeau... That's just off the top of my head

    Out of my head: the restrict and export keywords. If I remember correctly, only one of the compilers you mentioned really respect export, three respecs restrict, and they are errors for the others (left as an exercise to the reader). And let's talk a bit about inlining and implicit functions...

    None of them are perfect, but they're close enough as makes no difference.

    They do make a difference. They are not 100% compatible to the standard, and it means that code that would work on one compiler may not on the other. I've faced this in projects, and I'm sure the Boost guys are aware of it a lot (and use preprocessing to circumvent the differences).

    We're talking mainstream here. Wanna go see what's going on on the lowest tiers of the market?

  55. Re:Boost epitomizes everything that is wrong with by hr.wien · · Score: 1

    Well export is regarded as a mistake by the only people that have actually tried to implement it, so I can't say I'm really shedding any tears over that one.

    As for the rest, the only problem I've encountered recently is VC++ being too lenient in what it accepts. It still does fine with code written to the standard though, so once you have tweaked your code to work in GCC for example, it usually works in all of them. And this tweaking is hardly difficult. Took be about an hour to bring my game framework up in GCC after writing it against VC++.

    If you know of specific features that aren't well implemented across the mainstream compilers, please list them, but I haven't found anything that prevents me from using most features of the language (which is quite an improvement over just a few years ago).

    Now if you step off the mainstream compilers, you will probably have trouble, but in those cases don't use Boost. You'll have to write more code yourself, but that's the price you pay for sub-standard tools.

  56. Most game programmers don't use exceptions. by Anonymous Coward · · Score: 0

    Seriously... exceptions in C++ are the devil's spawn. Game developers don't use them at all, usually. The compilers for popular consoles even warn you not to use them, because of a performance penalty AND because they are not fully implemented in the compilers/libraries for that console (I'm not kidding).

    1. Re:Most game programmers don't use exceptions. by shutdown+-p+now · · Score: 1
      I wouldn't be surprised; game development is surprisingly close to embedded in many respects. As I recall, lack of exceptions was one of the design principles of EASTL.

      But, of course, there is far more stuff written in C++ than just games and software for embedded devices. And there, using exceptions makes total sense, because it's hard to use some other parts of the language without them.

  57. Re:Boost epitomizes everything that is wrong with by gokeln · · Score: 1

    The debugging problem, as I understand, will be largely fixed in the next iteration of C++, that's just an implementation detail.

    Maybe you don't need to debug your programs. I cannot make a living as a programmer without doing so. When they do get it fixed (somehow, I doubt this assertion), I'll consider using Boost. Until then, no thanks.

    --

    There's no time to stop for gas, we're already late.
  58. Re:Boost epitomizes everything that is wrong with by Anonymous Coward · · Score: 0

    I only counted five. Help me out.

  59. Re:Boost epitomizes everything that is wrong with by immcintosh · · Score: 1

    #1, it's perfectly possible to debug programs made with boost. Heck, unless the error you're encountering deals specifically with the mechanics of a specific template instantiation, it shouldn't really be any different than any other kind of debugging, aside from having to see ridiculously long type names.

    #2, not all of boost is obscure template magic. You seem to be under the impression that even touching Boost will contaminate your code with heavy preprocessor recursion and metaprogramming trickery and are basing your complaints off of that. Why, then, would you be averse to using its portable networking library? Or its threading library? Or its filesystem access library? Or any of the other countless Boost libraries that provide very useful functionality without even touching template metaprogramming?

  60. Re:Boost epitomizes everything that is wrong with by Poltras · · Score: 2, Informative

    I've given you two keywords (restrict, export) and two features (implicit functions, inlining) that aren't well implemented (okay, lets say different enough so that one code might not be compatible) across the mainstream compilers, but I'll tell you another one: template metaprogramming and typename.

    I don't know about the state of VC2008 and Comeau since I've stopped working with them a while ago (working on OSX with intelc and g++), but I remember by my young self having a lot of difficulties building cross-compiler expression templates and dynamic type resolution libraries. I'm not talking export here, just using templates of templates to build expressions that should be inlined correctly at the end of the compiler pipeline. If it's compiled at all.

    I won't find a real world code example, lets just say that when you enter the templates recursion, template operators and heavy template worlds, and you throw in some functors, binding and dynamic typeinfo (which are all standards, not some unsupported feature like export), what works on one compiler will choke the next one. I've had my share of "Internal Compiler Error". Those are nasty and almost impossible to resolve. And sometimes G++ just give up without an error code... oO

    Saying that what works on one mainstream compiler should work on the other if you follow standard is the same as saying that coding POSIX guarantees you to work on all mainstream operating system. Theory is fine, practice showed us otherwise.

    And boost came across these problems as well. Do you think the HEAVY use of macros and preprocessing is only there to render the code unreadable? :)

  61. Re:Boost epitomizes everything that is wrong with by hr.wien · · Score: 1

    Of course not, but Boost caters for a lot of compilers that have been superseded for years and years already. It goes to great lengths to hack around the limitations of VC++ 6 for instance, and that was released before the C++ standard was even ISO approved. There's also lots of fixes for old Borland compilers. If you removed all the old baggage, I think even Boost code would be relatively readable.

    I can certainly relate to the experiences of your young self with template trickery (VC++ 6 still gives me nightmares), but that just isn't a problem any more in my experience (and I do my fair share of template meta-programming). On the VC++ side 8.0 fixed most of the complaints I had, and on GCC 4.0 and onwards have been admirable as well. Intel's latest compilers have also been quite good in my (admittedly) limited experience. Comeau has always been very good. The differences just aren't that big any more, though again, there are some minor niggles (VC++ still has the odd internal compiler error, but I have been able to figure it out the couple of times it's happened the last few years.)

    As for the features you mentioned, as I said I doubt the actual usefulness of export and so do most compiler writers apparently. That one doesn't bother me. Restrict was actually a new one for me, and I had to look it up. Looks like it's a C99 feature? You can hardly fault a C++ compiler for not supporting that. :)

    Inlining seems to work wonderfully for me in any recent version of the big ones. They all support NRVO and RVO and do a very good job of eliminating static expressions, and unrolling static loops. I have a matrix math library that takes heavy advantage of this and I'm still stunned when I take a peek at the generated assembly. Deep recursive calls and huge functors compile down into nothing.

    Implicit functions (If you mean what I think you mean, the old deprecated C feature) are not not allowed in C++.

    All in all, the C++ compilers I work with are no longer standing in my way like they did some years ago, and it's bloody beautiful.

  62. Re:Boost epitomizes everything that is wrong with by Omnifarious · · Score: 1

    I agree with you that somewhere inside C++ is a small, elegant language screaming to get out. So, please write it already! :-) Until then, I'll use Boost.

    And no, I won't use your language if it requires extensive runtime support such as garbage collection, if it isn't statically compiled to machine code, or if it doesn't allow me to do the low-level fiddling I can do with C or C++.

  63. Re:Meta-programming by Omnifarious · · Score: 1

    Templates are not a natural way to express metaprograms. Why not give C++ programmers the tools to write nice, clean, object-oriented, imperative metaprograms instead of the kludgy functional metaprograms they are forced to scrape by with now?

    It is my intuition that you must define metaprograms in a pure functional language if the resulting programs are going to be statically compiled into machine code with little or no runtime support. This is especially true if the language supports multiple disjoint compilation units that produce object code that requires no compiler support to link together into an executable program.

  64. Re:Boost epitomizes everything that is wrong with by AuMatar · · Score: 1

    ARM for one. With the fun of needing to support 3 versions of the compiler for partners.

    Most of them have a C++ compiler, however the number of quirks and features missing vary greatly.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  65. Boost+MinGW? by CuteAlien · · Score: 1

    Cross-compiling from Linux would be an argument for using MinGW. But not sure how the current state of c++ cross compiling is, especially in combination with boost.

    I would also be rather interested in the experiences of others with MinGW+Boost. I'm currently trying to figure out if I should use ASIO for a new project (the other parts of boost don't matter that much for now for me) and I will work mostly on Linux but the stuff has to run on Windows in the end. And I usually use MinGW+gcc for the Windows part (although I also use the MS compiler often, if possible it compiles on all of them).