On 16 August 2011 at 11:45, Darren Cook wrote: | I had a poke around the Rcpp code today, and noticed exception | specifiers are used quite widely. I wondered if these were used with | full knowledge of their pros/cons in C++, or if they were put there by | someone coming from Java?
You will get a firm "oh quite possibly" for that. :) | Some arguments against their use: | * Item 14 in Meyer's More Effective C++ | (the Session destructor example was enough to convince me.) Hm, I don't have a copy handy right now, only his first and the STL one. | * Herb Sutter's "A Pragmatic Look at Exception Specifications": | http://www.gotw.ca/publications/mill22.htm I glanced at that, thanks for the pointer. | * C++0x has deprecated them. | (it introduces "noexcept" as a better throw(), but not available until | g++ 4.6) Right now I feel like 'wait and see'. We are pretty strict about suppressing g++ warnings and errors but this may not get addressed to g++ 4.7 or whichever warns about it. All in all it seems more like a stylistical issue. Thanks for the heads-up. Dirk -- Two new Rcpp master classes for R and C++ integration scheduled for New York (Sep 24) and San Francisco (Oct 8), more details are at http://dirk.eddelbuettel.com/blog/2011/08/04#rcpp_classes_2011-09_and_2011-10 http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel