Stack OverflowWhy was Google's Chrome browser written almost entirely in C++ and not C# or Java?
[+93] [35] community_owned
[2009-03-08 04:53:16]
[ c++ google-chrome unmanaged managed ]

Why was Google's Chrome browser written almost entirely in C++ and not C# or Java?

(11) This seems like a fair question for someone who doesn't fully understand the differences & benefits/costs between managed and unmanaged code. - Rex M
(3) Yes, and dismissing it out of hand is doing the question (and the whole idea of managed code) a big disservice. - Thilo
(18) Why would you think that SO users can guess at Google's reasoning? - Jay Bazuzi
Can someone add a link to the original post.? - Sung
"exact duplicate"? Ouch. FWIW, i voted for "Subjective / Argumentative": as Jay notes, we can't actually answer this (unless someone from Google happens to stop on by). - Shog9
I can't find any exact duplicates on SO. Without a link I'm voting to re-open. - Steve Rowe
I think i understand now: the author dup'd it himself:… - Shog9
@Shog9: Thanks. - Sung
This is a good jumping-off point for a more-than respectable answer breaking down the technical differences, pros and cons between managed and unmanaged code. Would be a useful resource for many and a helpful addition to the site. - Rex M
(9) closing both questions for being duplicates of each other is rather stupid! just close one and leave the other - hasen j
Is this really a programming question? We can only speculate here. - Ismael
Why bounty this? - Aardvark
Wow... cost him nearly all his rep too. Must be just praying for someone from Google to speak out... - Shog9
Why is this a wiki? - Agnel Kurian
(5) Because >= 30 answers were posted. That automatically forces wiki mode, under the assumption that if there was a real answer then it would already have been posted. - Shog9
Because drive-by malware and stacksmashing makes the world go 'round. - Longpoke
(1) The same reason kernels and game engines are written in C++. - Chris S
@Chris S: And most database engines, and most desktop Windows apps. - Warren P
@Warren P Desktop windows apps - feeling nostalgic?! - Chris S
@Chris S: It might not be as big as the Web 2.x bubble, but it's still a big market segment. - Warren P
[+170] [2009-03-13 19:36:33] Nikhil [ACCEPTED]

There are a number of reasons, which can be broadly classified as business reasons and technical reasons.

Lets start with the business reasons.

  1. C# is an open, public standard (ECMA-334) but .Net is not. Note that .NET Framework which is not covered by the ECMA/ISO standard, includes Windows Forms, ADO.NET, and ASP.NET. Patents that Microsoft holds in these areas may deter non-Microsoft implementations of the full framework. Would you develop a product based on a platform your competitor controls, especially when the product you are developing challenges the same competitor's product?

  2. Suppose you want to develop a new browser and you have a fairly decent operating budget. What people would you want to recruit? Clearly someone with browser development experience. You would try to get the best of the Mozilla/Firefox folk, maybe steal some from IE. Guess what these guys have been developing in. C++.

Now for the technical reasons.

  1. There is no Java/C# counterpart for WebKit. At least not with the same maturity.

  2. They want to leverage their V8 engine. Look into this, this is killer stuff.

  3. The following is a list of all that they are potentially using (this is from Chromium so may not exactly acurate). Can you find mature, Java/C# counterparts for them?

    bsdiff, bspatch, bzip2, dtoa, hunspell, ICU, JSCRE, libjpeg, libpng, libxml, libxslt, LZMA SDK, modp_b64, Mozilla interface to Java Plugin APIs, npapi, nspr, nss, Pthreads for win32, sqlite, tlslite, V8 assembler, WebKit, WTL, zlib

  4. No matter what people say sometimes the ability to operate close to the machine and have a fine grained control over memory matters. This is such a case.

  5. Can you name one significant desktop application done in Java/C#. Eclipse. What else? Maybe this is possible but don't you want to play it safe? Develop in a language that has been really battle tested in this regard.

(17) Isn't the V8 argument upside down? If they had decided to write the browser in C#, surely they'd have written V8 in C# as well. It seems unlikely that they wrote V8 first, before they had a product to plug it into. Similar for #3, a lot of these wouldn't be needed if they'd used another language. - jalf
I don't agree with no. 5th. SQL Developer, Netbeans, IntelliJ, SIP Communicator and can find many more. Not saying its more than C++, of course. - Adeel Ansari
Um... "battle tested"??? There's plenty of major apps that use .NET, here's a couple: SQL Server, SharePoint - Chris Pietschmann
@Chris -- desktop apps. No one questions Java/C# on the server - Eugene Talagrand
(11) SQL Developer, NetBeans and IntelliJ are all programming environments. Not desktop applications. They are also not very refined as end user applications --as programmers we endure a lot of bad GUI mojo. SQL Server is not written in .NET managed code. - foljs
(1) Both SQL Server and SharePoint are C++ Apps by the way, they just happen to support .net for some stuff thanks to COM. This includes some Management Tools, the Web Front end in SharePoint and additional functions in SQL Server. - Michael Stum
(5) I thought a lot of open office wrote in java. - Antony Delaney
(14) Paint .NET is written all in .NET. I'd consider that a major desktop app. I still argue that you're better off with C++ for a desktop app though... - Dan Herbert
Nikhil, It isn't Windows, but I count Banshee, F-Spot and Gnome-Do as big desktop apps written ontop of dotNet. Also C# does a quite good job in interop with native code. - Dykam
(10) Visual Studio 2010 is fairly major and has a lot of C# code, plus the entire Expression suite? - 280Z28
Eclpise is the only large desktop app written in Java I can come to think about. - Viktor Sehr
IntelliJ IDEA is written in Java and most certainly runs on the desktop in Window, Linux and OSX. The purpose of the app doesn't negate that the fact that is is a very responsive application written in Java. - Jarrod Roberson
(1) "C# is an open, public standard (ECMA-334) but .Net is not." Actually the CLR (the runtime) is a public standard, and there is at least one actively developed open source implementation: Mono. - Daniel Earwicker
See the Banshee open source alternative to iTunes - widely used on Linux, written in C# (doesn't even have a Windows version!) - Daniel Earwicker
(1) Mono stays Open until the day Microsoft decides to sue it (or the people using it). - Warren P
I thought Sun who have 1 operating system called Solaris have a java desktop module. Dont remember it was in Solaris 10 (robust performence and killer OS in many root levels). Java is not a small how it sounds in 4 characters!! - JavaNotFred
You forget about hardware acceleration, Safari and Chrome do alot of CSS/Canvas tricks and re-draws using hardware acceleration, this is technically feasible in VM. And Javascript interpreting logically is on the fly, so the VM add a second interpreting dropping a little bit the performace. - Vitimtk
[+130] [2009-03-08 05:10:47] Thilo

Google Chrome is based on the open-source Webkit rendering engine (also used by Safari), and that is written in C++.

This is the only compelling answer so far. - Jay Bazuzi
yep, i agree. it's because of webkit i think. also crossplatform: they want to port it to linux too they say. - Johannes Schaub - litb
(2) The question remains, why did they choose webkit instead of something written in C# or java! - hasen j
(23) Because there is no such thing as a fast, complete, and standard-compliant rendering engine written in C# or Java. - oefe
It is also coming for OS/X as per - Andy Dent
WebKit is written by the Safari team, so while it is technically also "used by Safari" that's not quite fair in spirit :D - olliej
(3) Eh. They based the core on KHTML anyway. - Bernard
yeah, they borrowed the code from the KDE team -.- - Johannes Schaub - litb
(1) As a curiosity, rumours say that WebKit is going to be added to Java7 too. - Esko
(1) Interop with native code is pretty seamless in C#, though not so in Java. But the rendering engine alone is probably not really a reason. - Joey
(2) I'm not sure I still understand why Chrome should be written in C++ simply because it uses Webkit which is C++-based. Safari (Mac), for instance, is an Cocoa app written largely in Objective-C (although the Webkit code is still C++) - Nocturne
(8) @Debajit: Objective-C is still a lot closer to C++ than either Java or C# are. Anyone who's had to work with the .NET MSHTML wrappers knows that the extra level of indirection just adds pain. - Shog9
@hasen j: Because writing an HTML layout engine from scratch is no trivial task. WebKit-the-layout-engine was good enough, it's just that its Javascript engine wasn't - mcjabberz
[+97] [2009-03-08 10:05:32] Max Lybbert

Google has a list of approved languages (Javascript, Python, Java, C and C++ I believe). C# is not on that list, so it was never a candidate.

I can only guess that Java's bad reputation for user apps didn't help it. Eclipse famously had to write its own GUI classes to get an acceptable look, and as a user of Eclipse I have to say that performance still leaves a lot to be desired; especially when compared to similar programs (Komodo and Visual Studio).

Additionally, Chrome has a novel design that each tab runs in its own process (although plugins run in the main process, so crashing Acrobat or Flash brings down all PDFs or Flash animations). Operating systems have certain hooks to do this, and they are accessible from C. In a Java-fied Chrome, Google would have had to call those APIs through JNI, which seems like the long way 'round.

(8) Eclipse is a wonderful program, but brings my slower machines to their knees. Not saying this has anything to do with Java, per se, just an observation. - Bernard
Besides from the initial startup time (about 30 seonds - I use MyEclipse 6.6) I don't have any performance issues with Eclipse. I just wish they could work on the startup as much as Visual Studio has. VS 2008 has a minimal startup time now of about 10 seconds on my system. - bruceatk
@bruceatk: Do you measure the startup time using your stopwatch or is there a way to measure it? - Ahmed Said
(10) Visual Studio 2008 runs slower than eclipse on my machine - Edison Gustavo Muenz
they also use ruby in SketchUp - fnieto - Fernando Nieto
I have to agree with Edison. VS2008 drags my machine to its knees sometimes, where I never have a problem with Eclipse. - JasCav
[+52] [2009-03-08 04:55:50] Shog9

Because writing it in C# or Java would have added a huge dependency without giving them anything in return.

Doesn't C++ add a huge dependencies as well? Would you be more specific how less of a dependency using C++ bring? - Sung
(18) C# & Java add significant dependencies, and give you a LOT in return. Fewer bugs from stupid language issues, garbage collection, a rich, sane-ish library to program against, better IDE/tools. - Jay Bazuzi
(1) From the user's point of view, I'd agree that they add dependencies that C++ doesn't. Most of the target audience just wants to download and run a browser. - MandyK
@Jay: We're not talking about some CRUD data-entry app here. A modern web browser is a huge undertaking, and you don't get to be naive about resource management just because you have garbage collection. Look at one of the dependencies Google did take on: WebKit. - Shog9
@Sung: The C++ runtime is quite lean compared to .NET/Java, and widely available. Beyond that, the dependencies added are entirely at the discretion of the developer: Google used WebKit, built a JS engine, and did their own UI abstraction. - Shog9
(1) @Shog9: so by dependencies, you meant in the context of runtime. Thank you. - Sung
@Shog9 - nice little implication that C# is only good for CRUD apps there. The size of the dependency might be part of the issue though I think Google's language policy is probably #1 reason why. C# has a good perf profile. @Jay - well said, sir. @Shog9 - go read . - kronoz
(1) C++ is an ISO standard available on all machines Google might be interested in. .Net is designed for lock-in, Google didn't want to depend on Microsoft for their future. - Jimmy J
@Jimmy - C# and .net is an ISO standard too, and there are implementations for linux and mac. Oh and note Chrome uses win32 API calls directly all over the place. Hence your statement could be repeated replacing C++ with C# and deleting the last part which is simply incorrect. - kronoz
(6) @kronoz: I use C#. It's great. Etc. But I don't pretend it makes all the bad scary parts of programming magically go away, or even that it makes all things easier. Please note that no one here has yet given a single concrete reason why one might want to use it for writing a web browser... - Shog9
I'm not saying C# is the be-all and end-all. I think C# is a nice language to use in general, and thus would be good on a web project - let's spin this around - why would C++ be a good choice? There are reasons why you might choose it, however C# isn't automatically a bad idea. That's the point! - kronoz
C# is a fine language, and .NET is a fine platform. I enjoy working with both. But it's a whale of a dependency, which was my point. C++, like it or not, lets you pick and choose your dependencies in a way that .NET does not (Mono allows actual compilation and linking, but that's fairly new). - Shog9
(1) And FWIW, i don't really care what you or anyone else thinks of C++ as a language. I've never been terribly enthused with it myself. It allows you to segregate platform-specific code and to pick and choose which libraries you'll depend on on any given platform - for some apps, that's gold. - Shog9
(1) Finally... Sorry if i offended you with the CRUD comment. My point is, .NET has a lot of good things to offer those writing CRUD and data-entry apps, but once you exclude those, exclude RAD, you're left with a very large framework that doesn't give you anything you can't get piecemeal elsewhere. - Shog9
(4) @kronoz: "ISO" is a Microsoft con game - C# is a standard, .Net certainly isn't and without it C# isn't much use. - Jimmy J
(5) Even if .NET was a ISO standard, that wouldn't solve the availability issue. So far, two implementations exist. One up to date, and one playing catch-up. That is not good enough if they want to be able to port to arbitrary platforms in the future. - jalf
(1) Google already has a huge dependency on Java through Android and more importantly the GWT which most of their offerings are written in - Chris S
GWT compiles down to JavaScript for client code. Android is their own OS, and ships with their own custom Java VM. The Chrome browser can be installed and run by users on machines where they do not have administrative rights, much less control over the OS and installed runtimes - that imposes a rather different set of requirements from those applicable to shipping an OS. - Shog9
[+45] [2009-03-10 17:33:34] ojrac

Chrome does a LOT of low-level hacking. Check out this article [1] for some details, but the idea is, they pulled a lot of very slick magic to make stuff like the sandbox work, and Java simply does not get them close enough to the OS. The drastic UI changes probably wouldn't work in Java, either.

C++ gives them access to all sorts of low-level and operating system APIs which Java abstracts. I suspect that there were several requirements just like the sandbox, that effectively made their decision between C and C++.

(I consider C# a non-option; it's the least portable of the three you suggested, and I doubt Google wants to rewrite their code for a mac/linux version.)


Eff that, just run it in wine. It'll be awesome. - ojrac
Dude, they cannot just use a legally dubious (due to MS patents), unsupported third party environment like Mono. Also, don't call people "Dude", except if you are under 24. - foljs
(2) If you check out the article, it turns out they do some even more legally-dubious stuff: the source code essentially admits to reverse-engineering some Vista API calls around data execution prevention. - ojrac
(2) Lol. Google doesn't even like C#/.NET! - mcjabberz
(2) No doubt Google would have used C# if their business model allowed it. Technically C#/Mono would clearly have been the best choice, but it would have been politically infeasible because they compete so heavily with Microsoft. Just the news that they used C# in a major product woud be bad for their position. - Ray Burns
[+36] [2009-03-08 05:02:22] qpingu

Because C++ is a fast and very popular language?

Its popularity is as much momentum as anything else. RE: fast, I know my C# programs end up at least as fast, given comparable time spent programming, because I'm done with shippable features in a fraction of the time; the remaining time can go to optimizing. - Jay Bazuzi
I don't think i would trust a Project manager who chooses a language for the reason of language being popular. - Sung
@Jay & Sung - it's still a fast and popular language - 1800 INFORMATION
(2) @Sung - A popular language means that you will likely be able to find programmers able to support it in the future. The ready availability of a large pool of talent is a very important consideration when deciding on a language. - oxbow_lakes
(5) C++ is th eonly language of choice for people who care about code quality and freedom to express their designs. C# might seem cool to a newbie but it soon runs out of steam and degenerates into massive verbosity when you run into the barriers inherent in the language. - Jimmy J
(24) if MS is not using C# for their browser, Office or ever calculator in Vista why would Google use it? - Nazgob
@Nazgb: +1 to your comment - Agnel Kurian
@Nazgb, perfect dogfood argument :D - workmad3
(2) Nazgob hit it on the head. - Max Lybbert
People don't give enough weight to "popular". The more people that are familiar with a language, the more that actually use it, translates in to "able to find more people to work on it in the future". Nothing against JAVA or C#, I actually like C#. They may someday finds themselves as popular as C++ - Jim C
[+28] [2009-03-08 12:48:12] Konrad Rudolph

Since Chrome is based on WebKit which is programmed in C++ (and whose codebase actually pre-dates .NET) the question doesn't pose itself here.

However, the question is very interesting in general: would a language such as C# or Java be well-suited to develop a web browser? In fact, a lot of the code could be written quite naturally in .NET: the HTML parsing engine. Due to its memory usage patterns, this code would be much easier than comparable C++ code and could even perform similarly (the GC in .NET deals well with this kind of memory allocation patterns; C++ in itself doesn't).

However, there still remains the problem of how much the JIT could optimize such code in the real world. While performance surpassing C++ is theoretically possible, it's really rare. In my experience, Majka is right to cite a speed advantage of one order of magnitude for C++ (depending, of course, on the particular application). It would be very interesting to see how HTML parsing would fare. I've already mentioned that the memory access pattern here is in favour of .NET. Another point scored for .NET is the text encoding issue which is hard and inefficient in C++. (see Rico Mariani vs. Raymond Chen [1]).

As for the actual rendering of the pages on screen, I'm prepared to bet that C++ easily outperforms .NET considerably. The same, with some reservations, counts for the JavaScript interpreter. I believe that the simplicity of .NET is simply not enough to beat the adaptability of C++ in this regard.

Also, there are of course cross-platform issues to consider. Although I think that .NET runs quite natively on Unix platforms using Mono, this still partly disqualifies OS X and many other more exotic platforms where installing Mono isn't that trivial.

I can't speak authoritatively but I've got the impression that Java would perform even worse than .NET in some domains.


[+24] [2009-03-08 04:58:02] Niyaz


Java or .NET runtime need to start up and the programs are interpreted by the runtime. This decreases performance.

(5) C# is not interpreted, it's JIT compiled, gives it a chance at beating native C++ programs, since it can optimize for the exact CPU. Many .NET programs have fantastic performance. (Maybe Java, too; not my area of expertise). - Jay Bazuzi
(4) Niyaz is right about start-up time though. The initialization time to load up the .NET dependencies, support assemblies and cache them all is high. Once that is done, the execution time of .NET is usually on par with unmanaged code, but there is a startup cost. - Rex M
Browsers in general already have a slow start-up. I doubt using a framework would slow this down considerably. - Konrad Rudolph
(3) I tend to open my browser once a day. I'd be glad to have 3 more seconds for JVM or CLR startup, if there are no more security flaws caused by buffer overruns and the like which you don't tend to get in managed languages. - Daniel Schneller
Languages don't shield you from security flaws. - Edouard A.
"Java or .net is ...interpreted by the runtime" -- and C++ code is interpreted by the C++ compiler. Both are (in general) interpreted into native optimized executable code before being executed (though, perhaps it's a matter of degree...) - Aaron
Konrad... to the contrary, using a managed language would make it MUCH worse. The reason that managed languages have a large start up time is they need to load libraries and start JIT compiling code. This would put an additional burden on browser startup. - shsmurfy
(3) "if there are no more security flaws caused by buffer overruns and the like which you don't tend to get in managed languages." Funny, so unmanaged languages automatically give you buffer overruns huh? And all this time I thought it was poor programming... - GMan
@GMan yes, overflows are everywhere. Even in OpenSSH with their 5 levels of revision comitees, some slip in. It is inevitable even for the best - Eric
Though in all honesty, if Google went the Java/.NET path, they probably would have made a service/daemon to keep an instance running in memory at all times. Only the first launch would be slow - mcjabberz
Solaris 10 which is Unix. There you got a desktop of Java built in. And its very fast. There is some high/top level confusion about this. So do not underestimate any language or technologies everything is fine. - JavaNotFred
[+18] [2009-03-08 07:29:32] hasen j

Chrome was designed for speed from the start!

The high performance of chrome was not a side effect, it's one of the main focuses of chrome. Otherwise, what would it offer over other popular browsers? (and why would anyone switch to it from, say, firefox?)


Chrome is intended to serve as a platform for web applications; this is why performance is key!

And, if you think about it, having chrome itself run inside another platform (e.g. .NET) is not very effective.

Chrome was designed with WebKit, enabling speed ;-) Look at the new Safari 4 beta... blazingly fast, same rendering engine. - Jilles
I switched from firefox to chrome for my daily browsing, exactly for the speed reason (I still use FireFox for development (FireBug!)) - Pim Jager
I switched to it for a while but returned to firefox! I've gotten used to all my favorite addons - hasen j
I could do without my add-ons, but I cannot do without incremental search. - Ed S.
AFAIK both Chrome and Firefox have incremental search. - Rene Saarsoo
yes, chrome has incremental search - hasen j
[+14] [2009-03-08 12:00:50] rama-jka toti

Kronos is picking up on .NET as having a 'great performance profile'.

This is pipe-dreams. It has dreadful performance penalty in execution, cache invalidation, footprint, dependencies, memory management is overhyped and most apps still leak sufficiently enough not to run decently on anything but latest hardware.

The C++ FAQ he is picking on is a disgruntled guy who deals with hardware and has missed the boat. Just read the style he blogs in and all will be clear.

As for 'on par' performance, anything of any decent complexity outperforms C# by an order of magnitude. I work as a performance engineer for over 30 years now and you can take that for granted as all those VMs and JITers generate appauling cache invalidation and hugely suboptimal code. All for a gain of not dealing with memory, which is pretty sad.

(3) Unfortunately, you're essentially right. - Konrad Rudolph
(1) +1. They only look at performance after all the setup work is done and then running in very specific profiles. After that, the best they can come up with is that it's as fast as C++ is by default. The real world has many more factors and they never take those into consideration. - bruceatk
(1) +1 same experience with C#/.NET, ostrich programming at its finest. - Anders K
Except .net is running the site you're typing on now. Try responding to the FQA's points rather than getting ad hominem... why is there this enormously violent reaction to criticism of C++?! Please provide some evidence for your claims. Seems like you're making assumptions my friend. - kronoz
(1) Using .NET to run a web site is different from using to run a browser: the slowness of the network makes the CPU usage of the server fairly irrelevant, and if you need more CPU you can add extra servers. A browser has a different requirements, so it is not unreasonable to prefer different platform. - pdc
(1) The FQA has a whole lot of points, mostly misguided or wrong in my quick look. Unlike the author, I'm not obsessive enough to go through a long document and refute every point. I have no objection to criticism of C++, I've done some myself, but the FQA is garbage. - David Thornley
(1) +1 A programmer who can't manage his memory isn't a programmer in first place. - Eduardo León
(2) Kronoz, I know you don't know C++ 20% because of the way you pick your references and cricise it. I was part of the 1998 COOL testers.I do C# for over 10 years(16 if you want to take Java, and 25 if you include SmallTalk).You # zealots missed the point while Anders is teaching you to be big-headed. - rama-jka toti
[+13] [2009-03-08 10:29:07] kronoz

As far as I understand it Google actually only permit their staff to program in either C++, Java or Python as a matter of policy.

I think the comments about performance are off the mark - yes Chrome is all about performance, however it is possible to write highly performant .NET applications, .NET is a JIT'd environment rather than interpreted, and tests have frequently demonstrated its performance capabilities. I am not sure about Java as I know little about it.

In terms of using Webkit, the functionality provided by .NET for unmanaged interoperability would make it possible to do so regardless, though it would involve some overhead.

There are, however, some legitimate reasons not to choose C# for the project:-

  • Who's going to maintain it? - Google's core language competencies, tools, and infrastructure revolve around C++, Java and Python.
  • Though C# has a great performance profile, there are sometimes issues with startup time (the CLR runtime kicking in). This can be mitigated somewhat, but still exists to one degree or another.
  • The GC will incur a performance penalty, as will the VM. These introduce latencies which may not be acceptable given the focus on a performant browser.
  • Portability - though Mono provides some portability for .NET applications, it may be easier for Google to port Chrome in native code due to its reliance on specific bare metal GUI APIs.
  • Wanting/requiring access to bare metal - chrome interacts with the win32 API directly in order to achieve its UI; this would be made far more difficult in .NET.
  • Wanting more convenient access to 3rd-party libraries - e.g. WebKit. 3rd-party libraries written in C/C++ are more easily accessible from unmanaged code with less interoperability issues. Since Chrome relies rather heavily on these it makes sense to write Chrome in the same language.
  • There are real concerns about Microsoft enforcing patents relating to C# and the .net framework - though they have given assurances that they will not, it has yet to be determined whether they will stick to this.

Note: Removed inflammatory references to C++ - for the sake of staying on-topic!!

Further Note: 2 years older + wiser - removing the last reference to the C++ FQA + adding some more drawbacks :)

mono exists on mac. - Bernard
Aha! Edit time... thanks. - kronoz
(6) EXcept the C++ FQA is wrong in nearly every respect. It completely ignores all C++ developments of the last ten years, eg. Nobody does manual memory management in C++ any more (which eliminates about half the FQA's ranting at a stroke). - Jimmy J
Jimmy, C++ sucks! - hasen j
@Jimmy - are you talking about smart pointers? That abstraction leaks nice and quick. C++0x is not yet available, nor is Chrome programmed in it. I sincerely doubt what you say about the last 10 years is correct. To me C++'s biggest problem is that it is un-parseable - has that changed? The syntax? - kronoz
@Jimmy - ...because I sincerely doubt that it has. As that would break most C++ programs already out there. C++ does not incorporate a GC, so precisely how do you avoid manual memory management? Frankly Jimmy I call B.S. on your comment. - kronoz
Memory management isn't that big a problem. It's just that you can't ignore it, other than that it's not a big deal. C++ has minimal runtime dependencies and will always be faster than C#. How can you guys expect google to use c# or Java, which force monster runtime requirements. - bruceatk
@kronoz, unparseable?? It can be just as readable as any other language. It's easy to write unreadable and cryptic Java or C#. Let me qualify my comments by the fact that I am currently programming in C# and Java. C++ for Chrome is the only language that makes sense to me. - bruceatk
@bruceatk - unparseable = can't be parsed by a /compiler/ easily. I was using that a figure of speech really, more accurately it has an undecidable grammar - for a good discussion. - kronoz
I'm not saying C++ is an insane choice, only that you can argue for C# in this role and saying C# is slow or tied in to Windows is too easy and simply not necessarily accurate. - kronoz
If done in C# it would be tied to a runtime requirement that would be unacceptable for an application like this. - bruceatk
Wow, i wish i'd read this answer first. @kronoz, you have a serious chip on your shoulder WRT C++, and this was exactly why i thought the question should have been closed. FWIW: there's a lot more to resource management than memory. Try to forget about Dispose while you're knocking smart pointers... - Shog9
Well this question is inevitably going to bring up language hang-ups! I don't have a chip on my shoulder about C++, I just think it sucks and for good reason, which the FQA site covers nicely. Not just a 'language x suxz0rzz!!' thing. - kronoz
@kronoz: very little of that site you keep linking to is actually relevant to this discussion. I assume you like it because it dumps on C++, but that doesn't mean you can just link to it whenever you want to question the use of C++ and assume your argument is complete. - Shog9
It is entirely relevant, it discusses why you might not want to use C++ for a large, important software project. Chrome is huge. It doesn't 'dump' on C++, it makes arguments against it which are fairly indisputable. In any case I made several points about the question, the C++/C# thing = aside. - kronoz
Talking about arguments being complete, C# giving them nothing in return?! Are you crazy? Huge reliable libraries, decent clean language that actually compiles in reasonable time periods, automatic memory management with an extremely effective GC, portability, real type safety etc. etc...sheesh. - kronoz
@kronoz: Are you saying smart pointers are impossible without C++0x? I've got millions of lines of C++ code which can prove you wrong. You can come over and grep my C++ code for the word "delete" and there's about 10 results (and they're all in pointer/container classes). The FQA is pure FUD. - Jimmy J
(3) @kronos: [quote]"...why you might not want to use C++ for a large, important software project."[endquote] ... Funny how most of the really large, really important programs in this world actually ARE written in C++. How on earth do they manage it? - Jimmy J
@Jimmy to be honest the undecidable grammar issue is enough for me to want to avoid it. Yes a lot of big projects are written in it, but then again a lot of big projects are written in COBOL (surely you saw that one coming)! I'm not saying all C++ programmers suck or some-such. Don't get me wrong. - kronoz
@Jimmy of course I'm not saying smart pointers are impossible without 0x, obviously they are. It's just they're a leaky abstraction in C++ as-is. Are you saying C++ has somehow patched up the issues raised on FQA? How is it FUD? - kronoz
@kronoz: again, whether or not you like C++ as a language is utterly irrelevant. Lots of Python fans at Google, but they didn't choose Python for Chrome. As for compile time... On large C++ or C# projects, your build system has a greater effect. The fastest compiler is the one that doesn't run. - Shog9
@Shog9 - Wow this is turning into a right furore here! Of course it's irrelevant whether I like the language; there are other issues such as how easy it is to use native libraries, etc. as I raised in my answer. My point is that C++ isn't somehow an ideal language, and wasn't necessary. Peace?! - kronoz
@Shog9 - when I say not necessary, I mean they didn't absolutely have to use that language, or it was so far ahead of any other choice as to be moot. Obviously Python genuinely does have perf issues, so wouldn't be a good choice and I hear Java isn't particularly fast + poor interop. So C++ it was. - kronoz
(3) @kronoz: "How is it FUD?" - because it's written purely to bash C++, it ignores STL and smart pointers (ie. the keystones of C++), uses C code for most of the examples, etc, etc. ie. It's a lie. - Jimmy J
That was my point: there's nothing about any of the languages being discussed that would make it a clear win. C++ has the lowest baseline dependency cost (once compiled and linked, nothing but system libraries), which i hold makes it the better choice; of course, no one but the Chrome team can say. - Shog9
OK, a question: What does the C# garbage collector do when you allocate enough objects to cause memory paging? What does all the continuous scanning of the heap by the garbage collector do to your performance? Garbage collectors aren't all pretty pixies and unicorns. C# has showstopping problems... - Jimmy J
@Jimmy J: the .NET garbage collectors are fairly fast; at least to where performance for naive usage isn't much worse than for, say, a naive, malloc/new-heavy program. Not that a web browser could afford to be naive about resource allocation. - Shog9
BTW: kronos, you should have a look at the V8 API. Quite a pretty interface i say, makes excellent use of modern C++ features. May not change your mind about the language, but should at least cure you of the "smart pointers BAAD" notion. - Shog9
@Shog9: "the .NET garbage collectors are fairly fast;" yes, of course. C# is fine so long as you don't stray outside its limitations. - Jimmy J
@Shog9: "Not that a web browser could afford to be naive about resource allocation." ... This is the point. Once you hit the limitations of "automatic" C# the amount of work and verbosity involved suddenly becomes more work than writing it in C++ would be. - Jimmy J
(3) @kronoz "C++ isn't somehow an ideal language" ... No of course not, but the C++ FQA is so far wide of the real problems that it's laughable. That didn't stop you putting two separate links to it in your post though, did it? - Jimmy J
@Jimmy J: Right. I have no doubt that a competent programmer could write a HTML DOM in C# that would be as or more efficient than the (C++) reference-counting implementation used by MSHTML; once you try to tune that though, there's no magic bullet: C# or C++, you've gotta manage memory manually. - Shog9
WOAH! To be honest, once we're talking the nuts and bolts of a browser, I have to admit ignorance and say that I simply don't have the expertise to say. I am basing a great deal on the FQA, and though I know C++, my knowledge is not extensive, so I can't tell if the FQA is always correct. - kronoz
Incidentally I am not saying I would never program in C++, it seems a large chunk of the actually interesting programming jobs out there use it so I may very well end up learning it more extensively at some point in my career... - kronoz
"I am basing a great deal on the FQA." If I was you I'd delete that link from my browser bookmarks. It's not worth the electrons used to transmit it. - Jimmy J
@Jimmy - well I guess I need to take a closer look at the language at some point. Personally I can't see how he can be wrong about the grammar issue, and that alone is enough to make it a bad language in my mind - e.g. horrible error messages + long builds. :-) - kronoz
"Long builds" is very dependent on how well you organize your header files. If you're constantly editing the main header file then yes, you'll do a lot of compiling. Google for "pimpl idiom" for one good way to avoid this. - Jimmy J
+1 for Who's going to maintain it? - Google's core language competencies, tools, and infrastructure revolve around C++, Java and Python. - David Waters
I have written a lot of code in C++ and I have never found it a painful activity. In fact, I think C++ is the language I like most, mainly because its power and flexibility. - Eduardo León
[+13] [2009-03-08 05:02:34] Michael Buen

Google employs OS-like features in its browser. Like process isolation in its tabs, one tab won't crash other tabs, even the plugins are on separate process. If you'll develop something on that level, C++ could give you the most hooks on OS

I don't believe you. There's nothing about C# that would make doing that harder. (Probably Java, too, but I don't know Java well.) - Jay Bazuzi
Ok then, you code the next killer browser in C#. Hey I love C# too - Michael Buen
(3) @Jay: Correct me if I'm wrong, but if you built a browser in C# and designed it to run each tab in a separate process, would you not lose most of the benefit of the .NET environment? Or can the .NET VM span multiple OS processes? - j_random_hacker
Michael, you are wrong on this score. The process isolation they employ on tabs is a Windows OS feature (not OS-like, as you implied). They are using a variant of a process known as a "job". If you open Process Explorer, you'll see what I am talking about. - AngryHacker
Adobe PDF viewer in one tab will freeze or crash Chrome. I've done it :-( - Andy Dent
@AngryHacker: indeed, what you say is what i'm also trying to convey. I just didn't go that further(i.e. Explaining the OS's process management through task manager). See? hasen j could understood what i said. I should have put double quotes on OS-like, if that triggers your pedantry. Why angry? - Michael Buen
@Andy Dent: In principle that shouldn't be. But since the "OS-like" features it implemented is just a hook on Windows feature(which AngryHacker too is well aware of), Windows is at fault there. The jury is out until we see its Linux and Mac version. - Michael Buen
The "one process per tab" rule has an exception for plugins, which can crash the whole app. - Max Lybbert
Why Angry? I am not. The domain name was available and I thought it was pretty cool to make my home there. - AngryHacker
It a similar level of difficulty in C++, C#, and Java [not equal, but similar in respect to the other tasks in the languages]. My thought is that they are using the MVC pattern to sperate the controller and model out to an individual process and keeping the [seperated (as intended)] view as what you see. This design would cause the individual processes to be a server and the viewer to be a client. - monksy
[+11] [2009-03-08 05:01:46] Rayne

Because C++ is much faster than either of those languages and they didn't want such a huge dependency. The browser is designed for users more than anything and a lot of people still don't know how to download Java. There is also the guess that they have more programmers who are more exceptional in C++ than in C# or Java. I personally would have wrote it in Clojure :p.

Aside from startup costs, c++ being faster is no longer true. For the majority of typical computational activities, JIT-ed CIL bytecode in modern runtimes is comparable to unmanaged c++. - Rex M
(1) Actually, Java is one of Google's official languages (along with Python and C++), so I'm sure they have plenty of competent Java programmers! - John McCollum
(1) @Rex M, Do you mean runtimes written in C++? I love how people dismiss startup times. I have written many utilities that completely do their work in less time then the .NET startup times. - bruceatk
[+11] [2009-03-11 17:32:59] Duncan Edwards

A browser is a style of application that needs to be slick, fast and easy to distribute.

Java's cross-platform capabilities give it limited support for slick GUIs and you also have a distribution issue with the Java virtual machine. Also, Java is generally a bad choice for fast-performing, native applications. How many of them are there out there?

C# WPF could have been a choice but the ordeal of managing and distributing the .NET runtime on every machine running Google Chrome would have been an instant showstopper. A good example of the installation overhead difference between a C# application and a C++ native application is the difference between something like Nokia's Come with Music [1] which downloads the entire .NET 3.0 runtime (~60MB on XP machines) and Spotify [2] which is 2.4MB all told.

The Browser market is difficult now that one of them comes bundled with Windows! So if you give the user a 60MB download of some framework that they haven't heard about and don't care about and it could be the difference between mass-adoption and failure.

Also, I gather that they had a certain amount of code reuse (in the rendering area) with their C++ option.


I doubt that they would have use AWT or Swing. Probably some native JNI-based binding more along the lines of SWT. - mcjabberz
[+10] [2009-03-13 21:43:26] Agnel Kurian

For almost the same reasons that surgeons use scalpels and not chainsaws.

[+8] [2009-03-11 17:55:49] Tony the Pony
  1. speed
  2. portability (yes, even over Java as the JVM introduces a dependency -- see #3)
  3. fewer dependencies

(6) +1 for speed> I love Chrome as it feels so light, can you imagine if it was written in Java, it would be like walking through drying cement. - johnc
[+7] [2009-03-08 12:50:34] rama-jka toti

Step back a second here. The C++ FAQ from that link shows you that the author would probably have a heart-attack reading the argument here.

He is going lower level than C++ into C, missing many features and getting lost in ranting. Just imagine what a perf hit for a tab and a button that goes to 12MB in managed would do to his thinking of C# and CLR (btw, it is nonsense to point out to a FAQ that would make CLR and C# look even more ridicolous in overhead than anything else on the planet apart from similar penalty Java VM).

If you just allocate 10,000, not uncommon, DOM nodes you would pay 2x overhead just in managed references overhead alone. So, put very, very simply, CLR doesn't scale or perform for anything but typical Rico Mariani trivial tests. Look at any decent size app and give it a good load and you'll see it scales just as poor as other historical mass-market solutions from MS/Sun. New solutions are no different apart from being more capable with threading and reworked Java with value types.

Do you own perf and sure go ahead if you think you can write a better browser, game, OS, IDE, VM, media editing app, audio and sequencing, image processing etc etc app.

VMs are known to deal extremely poor with large datasets. They grind to a halt basically. But for trivial samples, sure they are on par as it doesn't matter, doh!

VMs have been overhyped as they are easy to sell and train every Joe on the street and enflate his head that engineering is as simple as using a framework (largely due to MS blogging influence and leading to poorer and poorer software out there). But hey, you get useless candy and plenty of productivity to be proud about and be like everyone else.

That is why you pick a language for the task at hand. And you better know it 99% before you criticise it, or in right context. As we know, 99% of C# users know all other languages 100%, and make bloated software by default (they have no choice, MS and Sun make it for them).

I'd like to see proof of your claims. In fact, allocating 10,000 not uncommon objects would seem like an obvious case for some easily-implemented caching schema (just look at string interning). Why shouldn't .NET be able to do this? - Konrad Rudolph
(1) Let's see what .Net does whan I allocate a million objects and the garbage collector starts scanning all of them over and over, causing massive pagefile thrashing.... Ooops! - Jimmy J
(2) I don't know what you do Jimmy but I can easily create that many objects in .NET. - Konrad Rudolph
(5) @Jimmy J - go read how the garbage collection actually works before making ignorant assertions. I Richter's work, eg: - Andy Dent
(3) Yes, I think perhaps you guys should go read Rico's Mariani's blog for a while. He tends to think .net performs quite well. @Reoa you reference him later but conclude the opposite, hm... - kronoz
(4) Strange. Having spent many years (OK, decades) working on very large systems in the public sector, I've been responsible for .NET apps that were caparable to mainframe OLTP and batch services in terms of responsiveness and throughput. Perhaps it helps if you know what you're doing? - Steve Morgan
I didn't see any references in those links to performance while hitting swap. In my experience Java people would trot out the hoary old "RAM is cheap, buy more" platitude, and I see the same from C# devs now. With C or C++ swap perf can be as bad as with GC, but it doesn't have to be. - Zan Lynx
(1) Gee, you obviously still chase pipe-dreams. Ask yourself what you are running in fact? A C++ VM, a poorly coded VM in C++, that's all. What young and inepxerienced devs never see is that you are bootstrapped by C++ in all and many ways you still have to connect to. - rama-jka toti
Rico admitted he lost it, but then again Rico is just like Scott Gu. Started off with ASP and VB and what not. Man, we made OS-es when MS didn't even have one to boot with. - rama-jka toti
(1) Anyway, why don't you guys use a C# written CLR or C# browser or C# Office or C# SQLServer then? Go on and install Singularity and then we can talk how well it works Most of you never did a mpl::vector yet you qualify to criticise something you never saw or your language is still not capable of? - rama-jka toti
(1) Anders mass-market VB + Delphi-speak.. (C#) - rama-jka toti
(1) I completely disagree with bulk processing and having a VM. It depends on your design. With C++ you can get away with loading nearly everything in memory because it has a smaller imprint per data item. However, with a larger imprint you must be aware of ways to mitigate the effect of the larger imprint. (Use caching mechs, partial loading of data, managed systems (db server)) IMO: VMs encourage good habits. They aren't the quickest thing on the block, but an emphasis on a strong design and optimization later will yield the best and quickest results in the long run. - monksy
[+5] [2009-03-08 11:06:39] Nic Wise

My take is portability. I has to run on Windows, Linux and Mac. I guess they could, in theory, have used .NET or Java for that (eg via Mono for C#), but as someone else pointed out, a BIG selling point is the WebKit framework, which is (I think) C or C++, so no point in porting it to Java or .NET. Otherwise, they have to write a whole new rendering engine, and WebKit is very, very good.

For those saying it's performance: yes, and no. Managed languages (Java, C#) are nearly as quick as C++ in a lot of cases, especially if you use something like WPF for screen drawing. It's all JITed to machine code anyway.

That said, I guess there will be a lot of Objective-C in the Mac version, especially in the UI management code, so the language may depend on platform. Hell, I just want it for my mac. :)

JITing takes time. Monstrous runtimes take time (and memory). When comparing speed between two languages you can't compare the speed of an API that they both would use. Compare real work done entirely within the language. Performance of C# is good and so is Java. Neither are as good as C++. - bruceatk
yes, they do, tho I just bought 4GB of RAM for £50 for my macbook. Seriously. You might want to check the stats, tho - last time I looked, once code is JITed, the difference between C++ and Java or .NET was very very little. Not that it matters.... maintainability is WAY more important in my opinion - Nic Wise
The point is "Once JITted" - Chrome may be "almost an OS", but booting your browser takes that one step too far. It should just start and run. (Obviously it's OK to JIT uncommon stuff like printing) - MSalters
Chrome is in no way "almost an OS". It's a browser, an app. With a task manager. It aint no OS. And I'm guessing you may have the wrong meaning of JIT... I'm referring to Just In Time compilation, ala Java or .NET. - Nic Wise
[+5] [2009-04-05 10:48:12] Wedge

Leveraging Existing Software

Chrome leverages the open source WebKet rendering engine, which is written in C++.


Speed is a primary design goal of Chrome. C# and Java can be made to be very fast, but at the margins that Chrome is working at they can't be made as fast as C++ code.

Multi-Platform Compatability

Chrome is meant to be available on many platforms: Linux, Mac, etc, not just Windows. While Mono is a viable option for C# on linux, it adds significant complexities and trade-offs. Java is an option but the promise of "write once, run anywhere" has been largely unfulfilled. Multi-platform development using C++ is a known quantity with many successful examples (Mozilla, Apache, Photoshop, etc.)

[+4] [2009-03-10 17:18:47] AZ.

Because its main "selling" point over the competition (Mozilla, IE) is performance. Kinda tough to compete on speed using Java or .NET. Second reason is portability: .NET means Windows only and Java means dependence on a runtime that may not be available on the client. Keep in mind that Web Browsers are seen as a commodity these day that have to run on everyone's grandma's computer with no installation hassle whatsoever. A browser with dependencies is dead in the water.

It's not at all hard to compete on speed using a modern JIT compiler. Memory usage is a different issue, though. - Michael Borgwardt
[+4] [2009-03-09 07:14:07] OscarRyz

Because back then when the WebKit development was started C# didn't exist (as a matter of fact it still doesn't really exist in the Mac platform as of today despite Mono), Java had inferior performance and it was not the default programming language for Mac or Linux.

The codebase was KDE html engine in C++ and that's why it is not in Objective-C.

[+4] [2009-03-08 12:20:54] Nazgob

They do have top notch C++ engineers so they wanted to take advantage of it. Are there any popular browsers done in C#? I guess not so it would be hard to build a team with experience in both C# and browsers. And perhaps most important thing. C# is MS technology -> if MS is not using C# to write even calculator in Vista or their MS Office why their competitor would do that?

[+3] [2009-03-10 17:06:43] Edouard A.

I don't think the arguments "close to the system", "webkit" and so on apply. You can very well wrap this around and call that from C# and Java.

Let's turn the question around. Why shouldn't Chrome be written in C++?

[+3] [2009-03-13 18:07:28] natch3z

Applications that was written in C++ can run without the need/dependency of any underlying VM. This will be easier for end-users because they don't need to install .NET framework/JRE first. Also, it will provide better performance and better reliability.

[+3] [2009-03-13 17:54:47] Nemanja Trifunovic

I guess only someone from Google could answer this, but web browsers are really system applications, and system software is written with C or C++, not C#/Java. All other major web browsers are written with C++ as well.

What's a system application? Where is the magical border that makes a web browser system software and VS or Eclipse not system software? - Konrad Rudolph
I agree it is a somewhat gray area. For instance, Stroustrup defines system applications as: "applications with a significant systems programming component; often with resource constraints". See the paragraph 7 of this paper: - Nemanja Trifunovic
[+2] [2009-03-11 12:26:45] lsalamon

C++ was designed primarily so that the author and his friends would not have to program in assembler, C, or various modern high-level languages. Its main purpose is to make writing good programs easier and more pleasant for the individual programmer.
— B. Stroustrup (D&E, p. 106)

[+2] [2009-03-13 01:40:37] Jeff


[+2] [2009-03-13 17:32:46] Martin

Unless I am wrong, Chrome is based on many librairies for which .NET wrappers simply do not exist.

Instead of creating wrappers, they chose to go with C++, so they would get performance boost and a faster development.

Creating wrappers for all the C/C++ libraries they use would have required a lot of time / tests.

(1) :D Good one. That was hilarious. - Agnel Kurian
Performance boost? Yes. Faster development? No. - mcjabberz
[+2] [2009-03-13 19:11:59] gogole

The control, power and speed C++ provides can only be matched (surpassed ?) by C itself and not Java or C#. If you know exactly what you're about and after and do not need guidance from structures like the GC then you'd obviously go for as much control, power and speed as you can get. That's exactly what the Chrome team is doing I believe. Another possible reason is the one-thread-per-tab principle (concurrency of sorts) they've employed in chrome. To run such a system would need a lot of resources and access to these resources is crucial. Thus a language that doesn't hustle much to get to these resources ie. fast and close to the underlining machine architecture, would be the best bet to implement such a system in. Thats where C++ comes in.

[+2] [2009-03-08 12:19:02] bgreen1989

Performance wise. as you could see, Chrome is super light-weight, its RAM size used is smaller than Mozilla.

[+1] [2009-03-08 12:04:09] rama-jka toti

For 'great performance profile' check out what a managed app does to your machine, something like VS.NET (and don't forget it is due to partial .NET adoption, if it was full-on you'd need a cray to boot it, just like Singularity which won't boot btw).

Silverlight and WPF are another few examples of great performance killers, eating CPUs.

VMs are written in C++, and by reading that Kronos pointer FAQ and believing in it, by definition you wouldn't have a Java or CLR VM available today, yesterday or ever.

Arrogance comes from simplifiers in managed land really..

Woah dude! I find VS.NET performs well. Paint.NET is a well-known .net app, though it is obviously a small application compared to some. I find WPF and Silverlight perform well, and ASP.NET performs excellently also. Yes the VMs are written in C++, that doesn't mean C++ is a good language. - kronoz
A lot of the applications we rely on every day are written in COBOL, does that mean it's a good language?...! Anyway, look, let's focus on the guy's question not which programming language is the best, duuude! - kronoz
One last thing, Kronos: What are those COBOL applications you just mentioned? You say everyone uses it? - Agnel Kurian
[+1] [2009-06-23 04:12:26] paperhorse

When Google wanted their own browser, they did what any other company would do, they hired someone [1] with experience developing web browsers to lead their project. Ben Goodger, who was previously the lead Firefox developer, obviously had a lot more experince in C++ than C# or java (since Firefox is written in C++).

Its great to think of Google as so full of super-geniuses that they let their tea ladies design brand new browsers in each of the available languages (in the time they're waiting for the kettle to boil) and then released the fastest to us as Chrome; but the tangled twisted mess of web languages (HTML, CSS and Javascript) really is very hard to interpret.


[+1] [2009-06-23 04:34:41] community_owned

Portability and performance are definitely one of the many reasons. I think Java would have been great except that you're now relying on the Java VM which is a punch in the face when you compare such a product to FireFox or IE which are standalone products. I've worked with companies that stay away from anything from Microsoft. To them it's an unnecessary dependency. Using .NET framework may not be extensible enough for what you're doing. You may want to roll out your own algorithms and logic instead of using built-in features. This is especially important for such product as a web browser which competes with giants such as FireFox, Opera, Internet Explorer and etc. You have to make it fast. You have to make it efficient. Otherwise you labor will go to waste as you're not going to be able to compete. This is why having your own framework is a better thing since it allows you to make it as good as you want it w/o getting stuck with what you have to use.

[+1] [2009-03-13 18:03:10] Vasil

A benefit from writing it in C++ over C# is that they can as they plan to release versions for other platforms other than Windows. While it's possible to do this with .NET too it would have meant people would have to install the mono runtime which is not a very common thing on non Windows computers. Similarly writing it in Java would have created the dependency to the Java runtime, which would have been a better option. But it's not a very good idea to write something like a browser for a virtual machine because of startup times and performance, if they want to compete with firefox and other good browsers.

The other reason is the choice of rendering engines. Because they are using webkit which is written in C++ it's an obvious choice.

[-1] [2009-10-30 21:42:23] Cat Man Do

I imagine they made a trade-off of short-term benefits such as performance over long-term benefits like maintainability. C++ might be faster now than C#/Java code, but as hardware advances speed will be less relevent a benefit. It creates a terrible situation for security in that they are effectively snubbing the billions in IS work done to protect the .NET/Java Platforms from exploits. There is no way they can keep up. We might effectively be embracing the next ActiveX browser security hole by embracing Chrome.