3 ms·
Things like this make me wonder why anyone would want to write a huge project (like Firefox) in C/C++. I can understand wanting to re-use some legacy code, or p
by profquail 16y ago
Things like this make me wonder why anyone would want to write a huge project (like Firefox) in C/C++. I can understand wanting to re-use some legacy code, or perhaps the need for a few bits of optimized, low-level code where you really need the performance...but why not write the majority of the code in something like OCaml? I know there aren't as many good OCaml (for example) developers out there, but I'd bet that the end result would be just as fast (or faster) than the C/C++ version and have way fewer bugs (thanks to the strong type inference and succinctness of the code).
- k33n 16y agoIf Firefox were an OCaml project, it would have likely died before hitting 1.0. Also, I've never used OCaml, so maybe I'm wrong here, but I highly doubt it's faster than C.
- _delirium 16y agoI'm not a C++ fan myself, but I think the complexity problem with Firefox is its various bits of internal infrastructure more than the language--- XUL, the rendering engine, custom string libraries, and a whole bunch of FooManagers and other custom interfaces intended to allow all the parts to be plugged together. The only thing I can think of offhand that a change of language might fix would be that a move to a garbage-collected language might allow for ripping out some of the FooManagers dedicated to allocating/tracking/freeing memory.