13 ms·
Zed Shaw on C++
- mattrepl 16y agoPretty good rip on a few annoyances of C++ in Zed's fantastic ranting style.
- lanstein 16y agoClassic Zed. Nice, haven't heard from him in awhile.
- deleted 16y ago[deleted]
- zaphar 16y agoI really do love a good C++ rant.
- mcantor 16y agoThank you for this post. For the life of me I cannot explain why, but it delighted me immensely, and I am inexplicably incapable of reading it in my head without an exaggerated British accent.
- zaphar 16y agoStrangely enough, despite being thoroughly american, I am given to british spellings and mannerisms in my writing and speech. I think it has something to do with being really into british humor and fiction for most of my life. (british comedies, Terry Pratchett, Dr. Who...) I constantly get teased by friends about my british spelling s of common words.
- kqr2 16y agoThere appear to be a lot of good rants against C++. To name a few: * Linus Torvalds : http://lwn.net/Articles/249460/ http://lwn.net/Articles/249460/ * C++ Frequently Questioned Answers : http://yosefk.com/c++fqa/ http://yosefk.com/c++fqa/ Are there any good passionate pro C++ versus C arguments?
- lanstein 16y agohttp://www.odgaard.org/jeod/funny/interview.html http://www.odgaard.org/jeod/funny/interview.html
- alanh 16y agoWell, Bjarne Stroustrup has a rant on C++! But it’s not actually pro C++. (It’s also fictional, but a very amusing read.) http://artlung.com/smorgasborg/Invention_of_Cplusplus.shtml http://artlung.com/smorgasborg/Invention_of_Cplusplus.shtml
- btmorex 16y agoThe best pro C++ argument is that for all its flaws there's nothing out there that completely replaces it and it's still widely used. My own view: I'm not in love with C++, but it's not nearly as bad as everyone makes it out to be. Most of the arguments I hear against C++ are the same tired things I've heard hundreds of times. They all have a grain of truth, but nothing so bad as to condemn the language.
- weilawei 16y agoIt's not that any one thing is bad. It's that lots of things are bad.
- joe_the_user 16y agoLots and lots of things are bad in C++. But that's because it's an elaborate language with lots of things in it. You only have to use one bad thing at a time ;-). Basically, any language with lots of modularity and lots of low level access is going to be big and have lots of features that are problematic in some situations.
- blantonl 16y agoZed is literally the Kimbo Slice of the technical community.
- WilliamLP 16y agoWow, an MMA analogy on this site? Who are Seth Petruzelli, Roy Nelson, and Matt Mitrione then?
- charlie_root 16y agoDonald Knuth is Hélio Gracie Edsger Dijkstra is Masahiko Kimura John McCarthy is Yip Man Paul Graham is Bruce Lee Steve Jobs is Fedor Emelianenko Linus Torvalds is Mauricio Rua Bill Gates is Brock Lesnar Steve Ballmer is Eric Esch David Heinemeier Hansson is Anderson Silva Guido van Rossum is B.J. Penn Sergey Brin is Antônio Rogério Nogueira Lawrence Page is Antônio Rodrigo Nogueira
- WilliamLP 16y agoThat's awesome! I laughed a lot at Steve "Butterbean" Ballmer and the Google brothers! I thought John McCarthy was going to be John McCarthy. Yukihiro Matsumoto -> Kazushi Sakuraba Dennis Ritchie, Ken Thompson, Rob Pike -> Royce, Rickson, Renzo Gracie Joel Spolsky -> Tank Abbot Bjarne Stroustrup -> Matt Hughes RM Stallman -> Ken Shamrock Steve Wozniak -> Mark Coleman Rasmus Lerdorf -> Jon Fitch Don Stewart -> Art Jimmerson
- mkramlich 16y agoI've seen this pattern a lot when it comes to the order of learning/mastering languages: C, then C++, then back to C
- Niten 16y agoAnd then, occasionally, Objective-C.
- weilawei 16y agoI'll second that. I find Objective-C nice to work with. The real issue is the lack of cross-platform compatibility (think Cocoa). The rest I write in C. That or a dynamic language. Ruby, Javascript, Python--they're all pretty much equivalent for me by now. I can transliterate code between modern implementations of all 3 without a hitch. Practically find & replace fast. Most of the semantics are roughly the same. All support JSON happily. Lately, I've been using [Jansson](http://www.digip.org/jansson/ http://www.digip.org/jansson/) for JSON support in C. Wonderfully simple and fast. Also, [zeromq](http://www.zeromq.org/ http://www.zeromq.org/) for everything: logging, sockets, messages. Hoorah. F@&# yeah.
- 16s 16y agoAfter getting use to the STL containers... I could never go back to pure C. I use C++ daily and love it. Nothing against C (if that's what you like) it's a great little language. Why is it that C programmers bitch about C++, but C++ programmers don't bitch about C?
- c00p3r 16y agoBunch of age-old banalities from a famous narcissist on top of front page.. Is there any HN 2.0?
- alecco 16y agoExceptionally good critique. But there are exceptions: programming for Google's V8 in C++ is a pleasure. I've never seen any interpreter code so clean and easy to extend. Like a breath of fresh air.
- hazzen 16y agoI don't know if V8 follows the Google C++ Style Guide[1] (I doubt it, but it is possible), but that could explain a lot. I feel that it provides a good balance between power and readability. You don't have the language-within-a-language pattern that arises in some of the boost libraries, but you do get RAII and a few template tricks. The language feels much like a cleaner Java, with very few opportunities to do something incredibly stupid. However, if I had not been given the style guide and a more experienced reviewer to tell me right from wrong, I would be incredibly frustrated with the language. C++ is complex enough that a book probably isn't enough - you either need a mentor-type person or a very clean open source project to study. [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...
- aboodman 16y agoV8 mostly follows it: http://code.google.com/p/v8/wiki/Contributing http://code.google.com/p/v8/wiki/Contributing
- zedshaw 16y agoEmbed V8 into Python, then tell me how great C++ is. In other words, C++ is great until something else has to call it. Then you're hosed and end up wrapping everything in C anyway.
- alecco 16y agoHi Zed! Actually my code (unreleased but working prototype for a year) is an nginx server with a CMS module using V8 for scripting and templating web pages. Code is C (nginx module + w/ nginx-api) and C++/JS for the CMS. So I cross 3 languages. Works like a charm: ~6K req/s for complex queries (cached disk access with 1+ lstat() call every second.) Memory usage contained very well (always <20MB.) It's so good I don't touch the GC. Also since its security model for Chrome is among the best the "workers" can be recycled very fast if you create a good context. The problem with V8, as with almost anything, is it doesn't support well threading and its GC can be a bit unpredictable like any other automagic memory management interpreter. But even so, there are ways to control it. I certainly relate to what you wrote because I used to be a C++ dev in mid-90s (wintel, shivers.) But if you have some time, have a look at V8 for developers. It rocks. Also the newsgroup has a great community.
- Terry_B 16y agoI really dislike C++ but more to the point I really dislike other people's C++. This is triple compounded when you only have to do C++ occasionally. I've never even got close to the point of looking at something like const *const char & and reading it like it was something normal like others seem to do.
- mhd 16y agoI really dislike C++ but more to the point I really dislike other people's C++. That's right on the money. I can find a subset of C++ that I like and that I could program with, but that assumes that I'm not collaborating with someone and that I don't have to use C++ libraries (It's not just the code, it's the APIs, too). The latter is almost worse. I could imagine a company that has some rather strict standards, where the C++ development environment doesn't suck completely. Google's style guide seems to indicate that they might be one of those companies [1]. Much more likely you'd have to work with something like MFC, VLC or the complete boost hodgepodge. And Zed is right when he's talking about the template meta-programming fad. I haven't seen any project where the pros outweighed the cons. And yes, I've read Alexandrescu. People often say that you need all those features to build large applications. Which reminds me a lot of the "Doctor, it hurts when I do like this!" joke… [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...
- danieldk 16y agoThere are some very good template-based libraries. I think STL is mostly ok, but also libraries like Eigen are great, and avoid a lot of code duplication through templates. http://eigen.tuxfamily.org/index.php?title=Main_Page http://eigen.tuxfamily.org/index.php?title=Main_Page
- mhd 16y agoTemplates as they were used/implemented in earlier days where quite okay, apart from having to use other people's libraries, I preferred to solve problems using generic programming than just building class hierarchies (which now nicely translates to functional programming). Apart from very crappy compiler support (looking at you, Microsoft) I really liked the STL. It's simple enough (maybe a bit too simplistic). Template meta-programming is a whole 'nother deal. It's like the rabid daughter of an unhappy marriage between Lisp's macros and Perl. From some angles, she looks rather enticing. Then she bites down on your crotch.
- prog 16y agoThis is the first time I heard of Grace C++[1]. Looks very useful. I was looking for string that can be used for binary data. Looks like they support that too. [1] http://grace.openpanel.com/ http://grace.openpanel.com/
- zedshaw 16y agoGrace is absolutely awesome. The value type and format syntax are exactly the way it should be done.
- felideon 16y ago"If I wanted to fry my brain trying to figure out how to add two numbers with templates I'd go use LISP." Probably just a tongue in cheek comment, but I wonder what he meant.
- pcarmichael 16y agoI'd guess he's referring to template metaprogramming.
- mahmud 16y agoProbably another run-of-the-mill confusion of macros for templates. "LISP" is a convenient red-herring to throw into PL diatribes; it shows the speaker has some authority since he is "aware" of Lisp, and the glowing and mystical connotations that this, vague, awareness carries.
- zedshaw 16y agoNo, more a nod to Lisp getting "metaprogramming" right when C++ screwed them up. If I've gotta do it, I'd rather do it in a language where the turing completeness wasn't designed to be a tarpit.
- mahmud 16y agoAnd there goes my attempt to trick you into becoming a Lisper :-( Learn CL inside and out, not because you want to be a better programmer, but penning "Lisp is a Ghetto", if you get it right, will guarantee your name echoes in the hallways of hacker heaven long after we're both gone.
- travisjeffery 16y ago"They'd have been better off to just invent a new keyword: doesnotfuckingchange and stop there." And now I have tea to clean off of my monitor and keyboard.
- tptacek 16y agoI agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do what I've done and what lots of other C++ programmers whose code I've read have done: just use char* and a simple string library (or a custom string class). * Ditto for stream IO, which is a huge C++ misfeature but which is also pretty much irrelevant (I know of no part of the standard C++ library outside of things that explicitly support stream I/O that rely on you using it). * I don't get the POSIX argument at all; just call the POSIX functions, they work fine. Nobody mandates that you use (say) ACE_wrappers to do systems programming. * const-correctness may be another misfeature (I know I make fun of it), but the point isn't hard to see: if you take the time to const-correct your code, the compiler will spit out errors that would have otherwise been runtime faults.
- joe_the_user 16y agoI like the QT library. It is an alternative to all this absurdity. QT's strings, streams and containers have infinitely better syntax than the bondage and discipline of STL. And QT may not be standard but it's going to be more widely used and supported than any string class I might roll myself.
- alanh 16y agoAlexandrescuisms has 2 hits on google including this page. To what are you referring?
- afhof 16y agoWhat would be better is if C and C++ divorced each other and people realized that they are two separate languages. All of Google's results for C questions end up linking to some "C/C++" forum, which is almost certainly not what I'm looking for. I'm sure the other way 'round is true too.
- phaedrus 16y agoI love C++, but I upvoted this because most C vs. C++ rants focus on things that are not actually C++'s biggest problems. This is one of the few C++ rants that actually brings up of legitimate points. They are not reasons that would stop me personally from preferring C++ over C, but they are valid criticisms. P.S. On the subject of format strings vs. cout and the "<<" madness, C++0x's variadic templates will allow a type-safe printf. So hopefully in the future we WILL see C++ move back toward format strings, but without loosing the type safety. It also gives the possibility of instead of having to remember to use %d for ints and %f for floats, we could just use format strings that use {1}, {2}, etc. as format string placeholders, the way C# does. Freeing you from having to specify in the format string what the type is is something C++0x type-safe-printf would allow you to do that you could never do in C.
- zedshaw 16y agoActually, this is what I loved about Grace. It was like all the crap that pissed me off about C++'s design decisions just went away. It made C++ so nice to work with.
- ehnus 16y agoI always see streams brought up as a critique of C++, at least compared to how it is handled by C, and I agree that they are terrible. However, everyone else also agrees that they are terrible, and as an added bonus the C IO functions are still available. C++ brings a lot of heavy-weight machinery to the table but the best part is that you don't have to use it. If you just want to write C but desire templates to reduce the amount of writing you need to do then so be it, write C-with-templates! My big beef with the language is mostly due to the legacy crud it is saddled with in the C preprocessor. Many of the build time issues I find myself suffering with are because of people, for example, including Windows.h a) in the first place and b) not defining WIN32_LEAN_AND_MEAN. Junior (and senior, for that matter!) developers seldom know how to properly structure their code so that their iteration times don't plummet.
- drawkbox 16y agoI like C or C++ for native but use C++ more because I write it with simplicity. Complex C++ like MFC, Windows API, template hell is disgusting and wrongly gave C++ a bad name. C++ OO can be done to really abstract the application but still be very manageable and simple. Also C++ is a game industry cornerstone. I think game code in C is actually harder to consume that game code in C++.
- watmough 16y agoCall me unlucky, but I've never worked at a company that had a high percentage of programmers (myself probably included) that could write solid C++ using anything more than the absolute basics, i.e. basically a C subset. I'd pretty much agree with Zed's rant, that C++ often isn't worth the bother, unless you have a project that specifically requires C++ features, and you have a development team that can actually write solid C++. Maybe I'll call this Jonathan's axiom, but if your team doesn't have enough experience to write in a Lisp-y (or any other genre such as ML-y) language, you probably shouldn't be messing with C++ either. Not many people that say they can write C++, actually can.
- zedshaw 16y agoI think this is a key point, the language doesn't matter as much as the capability and training the people using it have. This is why all these language arguments are rather irritating, because I'll typically use what works best. On some projects, C++ is great. On other projects C is best. Python is great for some things too.
- danieldk 16y agoSpot on, and a far better critique than Zed Shaws rant, that boils down to 'I dislike the syntax' mostly. Many things are done nicely in C++, and C++ provides far better abstractions than C. However, since new language construct have been stacked on C++ for almost 30 years, the language became huge, as well as the possible interactions between language constructs. The result is that you will rarely find programmers that understand C++ fully. I have seen a lot of awful code that uses C++ as C with classes, badly. Usually, classes and functions have been written with so little understanding of encapsulation that refactoring is painful. And for properly written C++ programs and libraries, it's usually hard to find people to maintain/modify it. On the other hand, it is also hard to find good ML/Haskell/whatever programmers. And lots of people get away with writing ugly Python or Ruby code.
- d0m 16y agoThe real problem with C++ is that there isn't a fucking split function in the standard library.
- sadapsi 16y agoI fail to understand why you are downvoted! but no string.split ??? wtf
- dan00 16y agoI donate you one: #include <vector> #include <string> #include <iostream> typedef std::vector<std::string> Strings_t; Strings_t split(const std::string& string, char onChar) { Strings_t splitted; size_t lastSplit = 0; for (size_t i = 0; i < string.size(); ++i) { if (string[i] == onChar) { if (lastSplit != i) splitted.push_back(std::string(string, lastSplit, i - lastSplit)); lastSplit = i + 1; } } if (lastSplit != string.size()) splitted.push_back(std::string(string, lastSplit, string.size() - lastSplit)); return splitted; } int main() { Strings_t strs = split("$$qqqq$$$w$$$eee$$a$d$$$$$", '$'); for (Strings_t::const_iterator s = strs.begin(); s != strs.end(); ++s) std::cout << *s << "\n"; return 0; }
- d0m 16y agoI never said I didn't know where to get one, or to actually write it. In fact, you can do it way simply with getline(). It just always pissed me off when I hack a little something and there is no split.. I then need to either include boost which is huuuuge compared to my 200 lines file.. code it myself, get a snippet from internet. The point is: in C++, there are so much things.. It's like a fuckload of thousand of features to satisfy everyone. How the fuck can there be no split? Ruby, split, python, split, java, split, php, split, C# split, C++ -your-20-lines-function-which-only-support-splitting-on-a-char-but-not-on-a-string.
- dan00 16y agoWell, all these languages are very stringy because they are very weby.
- boryas 16y agoI'd like to extend his position to the argument that the semantics of any language that isn't ML or Lisp are too complicated...
- dtf 16y agoI don't get these rants. Both C and C++ are such barebone languages that you can take or leave pretty much everything but the common syntax. Zed decides C's string functions are not up to scratch, and so uses bstring. Plenty feel the same about std::string, and will use bstring's CBString, Qt's QString, or some other class in their C++ code. Exceptions? Take them or leave them. setjmp/longjmp? Take them or leave them. Templates? Take them or leave them. Macros? Take them or leave them.
- loup-vaillant 16y agoThe problem is, your co-workers will do the same with other features. Unless the project is under a strong dictatorship, you'll end up taking everything.
- deleted 16y ago[deleted]
- _pi 16y agoIsn't that what meetings about design of the project and coding standards are for?
- malkia 16y agoThere are great C++ projects, but the big compile/link times they have are not a small deal. Also the compiled libraries take a lot of space. Examples: Qt, wxWidgets, LLVM, boost Hopefully we have IncrediBuild at work, and we don't have to deal all the time with such huge frameworks.
- nickelplate 16y agoYou don't have to build these libraries from scratch every time. You could store pre-compiled binaries in a shared drive for every possible configuration, and developers can simply copy them to their machine. Not that big a deal.
- malkia 16y agoThe problem with const string& is that the resulting string is not interned - e.g. one copy in memory, which would later allow to save memory, compare by pointer equality (eq), etc. I understand that the language cannot express it, and that's why other languages (such as lua) do it the right way - immutable strings all the way, or at least by default (NSString)
- dzorz 16y agoYou can make a string class that interns strings. Language can express it, but std::string doesn't do it.
- fauigerzigerk 16y agoI agree with most of what he says but not with his memory management argument. In C++ you could do something like this: f() { LinkedList list; populate(list); use(list); //forget } Freeing the list elements is done in one place only, in the destructor of LinkedList. In C, you have to call some kind of free function in every single place a LinkedList is used. The burden of managing memory is on the user of a library, not on its creator. I don't think this is enough to justify using C++ though.
- yonilevy 16y agoThank you for bringing that up. It's called RAII and it's one of my favorite features of C++. The fun thing about it is that it can also be used to manage other resources such as files, sockets, locks or what not.
- tzs 16y agoThat was rather bogus. Sure, destructors are horribly complex in their interaction with all of the other horribly complex C++ features. But unless I'm reading it wrong, Aughey wasn't suggesting using all those other features. If you have some reasonable self-control, it is quite reasonable to use C++ as a small superset of C.
- dan00 16y agoJust using constructors/destructors and class encapsulation makes code so much more readable. And most exception problems are solved with RAII. If you're using RAII, then you won't have memory leaks when exceptions arise.
- BonoboBoner 16y agoI hoped it would be a blog post like "C++ is a ghetto"...
- rcfox 16y agoForgive me if this is a terrible question, but who is Zed Shaw, and why should I care about what he says about C++?
- fauigerzigerk 16y agoHe is a guy who has written some great code (Mongrel) that is valued for being clean, correct and fast.
- DanielBMarkham 16y agoI'm going to keep saying this until I turn blue in the face. Perhaps if I stamp my feet it might get more attention (wink) Please stop confusing the language with the APIs or the available libraries and features of the language. This sounds simple, but it's profound: simply because you can do something, that doesn't mean that you have to do it that way. To use Zed's example, let's say I'm hacking around a lot of strings. What's wrong with rolling a string class, adding a member or two? You only have to carry around a bunch of nonsense if you want to. If you don't want to use templates and strings and such, don't use them. This is another in a long line of articles that go something like this: We did X in this certain way, and boy did it suck. Therefore all of X is the devil's work and will destroy civilization. You can put about anything you want in for X. It's like a (oddly enough) template engine for writing blog entries. You should go through stages in your career, with just about any X. Stage one is that you are ignorant. Stage two is that you've tried it. Stage 3 is expertise. Stage 4 is hate, and Stage 5 is grudging acknowledgement that parts of X are okay for certain situations. You realize that yes, X is done poorly maybe 99% of the time, but lots of smart people worked on it and there are some little gems in there that are useful from time to time. Looks like Zed is stuck on Stage 4 Throw away the templates, throw away all the library stuff you don't like -- is there a reason to make a class and wrap some things? If so, you can do that in C++. You can't in C. It's a very simple question, and it has nothing to do with any of the things Shaw is going on about.
- jdminhbg 16y ago"What's wrong with rolling a string class, adding a member or two?" The fact that it's 2010? A language and its standard library are theoretically different things, but in any practical sense, the choice to use a language carries with it the choice to use its standard library. Additionally, the way the standard library is usually reflects constraints placed on it by its language. Java, for example, has a verbose and ceremonial standard library, and that's not a coincidence.
- DanielBMarkham 16y agoAnd the fact that it is 2010 relates exactly how to wrapping character array functions? Because I'm not following. If you're in C and using strings, it's still 1985 for you too. There may be a larger argument about whether the various standards bodies have so complicated C++ that it's become unwieldy -- the comment about exceptions in destructors has merit. But that's not the argument he was making. Good programmers are good because of the things they don't do. It's the guys who want to use every feature and library that are often the ones creating the disasters the rest of us have to maintain. So yes, the features and such of a language can hurt. But that's true of just about any language save some of the hardcore functional ones -- C++ maybe more so than the rest. Being a coder using modern languages means judicious use of complexity. Simple is almost always better. Which is exactly where he's coming from, he just takes his argument too far. In fact, one of the things C++ teaches you early on -- or you suffer all sorts of pain -- is when to abstract, when not to, when to use libraries, when not to, and the dangers of frameworks. It's the very fact that it's such a complex monster that forces coders to keep it simple, stupid. You don't get that kind of thing out of the box in something like Java. This is more bad than good in terms of delivering solutions, but it also is not all bad. It has merit because it trains programmers about the kinds of disasters they can make. If you can write good, easily understood and maintainable C++ code, I can trust you with about anything. If the first thing you do is jump in the swamp where all the alligators live simply because you can -- templates, large inheritance trees, etc -- then probably not so much.
- obiefernandez 16y agoDoesn't the D language fix a lot of the issues that Zed is complaining about? Constantly surprised that it's not more mainstream...
- zokier 16y agoD could have saved us from the horrors of C++, but it dropped the ball. http://www.jfbillingsley.com/blog/?p=53 http://www.jfbillingsley.com/blog/?p=53 http://news.ycombinator.com/item?id=911858 http://news.ycombinator.com/item?id=911858
- mark_l_watson 16y agoI have to agree with the spirit of the article. In the late 80s and early 90s, much of my work was in C++, and I did some mentoring, wrote a bunch of C++ books, etc. After my C++ period, I did a major project for myself and just used C - like a breath of fresh air after C++ In all my years using C++, I think that the only good applications where C++ made sense was in Nintendo and PC game development at Angel Studios and some VR development for Disney and SAIC. Everything else that I did in C++ should have been done in different languages.
- shin_lao 16y agoThe std::string example given by Zed shows that he didn't hack around C++/STL much. There is a whole entry in Exceptional C++ Style (or another Herb's book) that says how much std::string sucks and how you can write an equivalent extremely quickly. Anyway, don't like std::string ? You can use std::vector in place very easily, that's a well known trick (thanks to the guarantee that &v[0] returns a pointer to the data if v is a vector). He talks about references but he seems to ignore the capability of C++ to offer perfect forwarding which enables you to greatly increase performance and memory usage and that's very difficult to mimic in pure C. There's a lot to write about inaccuracies in this post actually, but what the point? People who hate C++ will discard them and people who love it already know it. I tire of reading posts from people who didn't like a language for whatever reason and try to rationalize it.
- JabavuAdams 16y agoThe problem with a lot of these posts on HN is that the audience seems to be rather biased towards low-performance app areas like web, and business apps. Oh noes! I have to handle 10 requests a second! Take a look at the SWENG-gamedev mailing list for some of the performance issues that people face in games and game tools. /pissing-contest Note: obviously this is not an argument against C instead of C++. It's more to forestall the meta-discussion.
- c00p3r 16y agoThe portable subset of C++ were around long before mozilla, webkit or chromium. Anyone can read mozilla's or google's guidelines about which subset of c++ is safe to use. One of the best examples is Informix RDBMS which was acquired by IBM in 2000. And the second best is... JVM. ^_^