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."

21 of 166 comments (clear)

  1. 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 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?

    3. 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...

  2. 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.

  3. 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

  4. 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++"

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

    doYouLikeThatNamingConventionBetter OrEveThaNamCon?

    --
    You just got troll'd!
  6. 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 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!
  7. 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?

  8. 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.

  9. 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...
  10. 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.

  11. 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.

  12. 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...
  13. 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.

  14. 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.

  15. Re:Now if only by ampathee · · Score: 3, Insightful

    That's PascalCase. This is camelCase.

  16. 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.

  17. 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?