3 ms·
I agree that using exception is hardly noteworthy these days, but consider that in the context of a codebase that has evolved for more than a decade. I guess,
by yongjik 12y ago
I agree that using exception is hardly noteworthy these days, but consider that in the context of a codebase that has evolved for more than a decade. I guess, ten years ago, "let's not use exceptions; they aren't worth it" was more justifiable.
In any case, the decision was made, and we have millions of LOC where every single API is built with the assumption "No exceptions here." In that context, introducing exceptions seems suddenly a lot more trouble than its worth. Well, YMMV, and in any case I'm not a decision maker so what do I know.
* BTW, I think "a single codebase maintained by thousands of engineers" is the single best thing I found in Google, as it opens up infinite possibility of learning new tricks, new APIs, and sometimes new projects. (Of course, everybody complains that every API is implemented at least three times, but imagine how worse it would have been if every project had its own codebase.)
- Game_Ender 12y agoNot adding much value here, but it is a lot worse. You get 5+ implementations everything, and every project is different just because.
- claudius 12y agoThis is of course a valid reasoning to forbid the use of some features at this particular company. However, it renders advocating the Google C++ style guide as an ubiquitous style guide for all C++ programming rather moot.
- yongjik 12y agoCompletely agree. I hope nobody's naive enough to say "Well, if this style guide works for Google, it sure should work for our company...!"
- p0nce 12y agoPerhaps you would have less millions of LOC if you could reuse third-party libraries which happen to use exceptions? Also no exceptions implies no failing constructors which is plain ugly as a constraint.