Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Boost 1.36 Released 166

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."
This discussion has been archived. No new comments can be posted.

Boost 1.36 Released

Comments Filter:
  • Now if only (Score:1, Insightful)

    by Anonymous Coward on Sunday August 17, 2008 @03:34PM (#24637097)

    they could get rid of the crappy_api_naming_conventions.

  • Use of Boost? (Score:3, Insightful)

    by Anonymous Brave Guy ( 457657 ) on Sunday August 17, 2008 @03:56PM (#24637341)

    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.

  • by Anonymous Coward on Sunday August 17, 2008 @04:30PM (#24637679)

    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

  • Re:Use of Boost? (Score:1, Insightful)

    by Anonymous Coward on Sunday August 17, 2008 @04:39PM (#24637771)

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

  • by MostAwesomeDude ( 980382 ) on Sunday August 17, 2008 @05:12PM (#24638065) Homepage

    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.

  • by HappySmileMan ( 1088123 ) on Sunday August 17, 2008 @05:34PM (#24638311)

    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

  • by Anonymous Coward on Sunday August 17, 2008 @05:34PM (#24638319)
    What's happening? Are these people from commercial sellers of C++ libraries saying bad things about Boost?
  • by hr.wien ( 986516 ) on Sunday August 17, 2008 @05:36PM (#24638337)

    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.

  • by EWIPlayer ( 881908 ) on Sunday August 17, 2008 @06:03PM (#24638591)
    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.
  • by pla ( 258480 ) on Sunday August 17, 2008 @06:33PM (#24638849) Journal
    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?".
  • by benhattman ( 1258918 ) on Sunday August 17, 2008 @06:44PM (#24638951)

    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.

  • by kriss ( 4837 ) on Sunday August 17, 2008 @06:53PM (#24639019) Homepage

    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.

  • by benhattman ( 1258918 ) on Sunday August 17, 2008 @06:54PM (#24639031)

    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.

  • by EWIPlayer ( 881908 ) on Sunday August 17, 2008 @07:43PM (#24639385)

    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.

  • Re:Use of Boost? (Score:3, Insightful)

    by Anonymous Coward on Sunday August 17, 2008 @07:50PM (#24639457)

    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?

  • Re:Now if only (Score:4, Insightful)

    by ampathee ( 682788 ) on Sunday August 17, 2008 @09:24PM (#24640013)

    That's PascalCase. This is camelCase.

  • by Anonymous Coward on Sunday August 17, 2008 @09:38PM (#24640097)

    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.

  • by j00r0m4nc3r ( 959816 ) on Sunday August 17, 2008 @10:04PM (#24640301)
    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.
  • 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?

  • by Flat5 ( 207129 ) on Monday August 18, 2008 @12:24AM (#24641149)

    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.

  • 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))

  • by imbaczek ( 690596 ) <(mf.atzcop) (ta) (kezcabmi)> on Monday August 18, 2008 @06:43AM (#24642923) Journal
    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?
  • Set theory (Score:3, Insightful)

    by krischik ( 781389 ) <krischik&users,sourceforge,net> on Monday August 18, 2008 @10:47AM (#24645131) Homepage Journal

    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

  • Re:Use of Boost? (Score:4, Insightful)

    by immcintosh ( 1089551 ) <slashdot@ianmcin ... .org minus punct> on Monday August 18, 2008 @01:17PM (#24647619) Homepage

    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 [boost.org] 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...

A morsel of genuine history is a thing so rare as to be always valuable. -- Thomas Jefferson

Working...