4 ms·
> Firefox is a massive legacy codebase that couldn't be cleaned up without breaking A LOT OF THINGS, and at every step in the process they faced people begging
by eric-hu 9y ago
> Firefox is a massive legacy codebase that couldn't be cleaned up without breaking A LOT OF THINGS, and at every step in the process they faced people begging them not to break their things, despite the alternative being the continued rot of Firefox's internals.
I've made a couple small contributions to Firefox. Though I'd been a Firefox user for years, this never occurred to me until I looked at the source in 2015 and saw TODO comments to upgrade a C++ operation to something available in C++11 (that's C++ released in 2011) when Firefox dropped Windows XP support.
I was surprised at the time that so much of the code was ES6. My mentor pointed out that web app companies might need to wait a few years for users to mass-adopt ES6 browsers. On the other hand, Firefox can use ES6 everywhere in its own code where JS makes sense, since it's only going to be running on latest Firefox JS engine.
I think Firefox hit full ES6 compatibility first among the browsers because there was this extra incentive to modernize the codebase.
Chrome didn't have to build off of the Netscape source, so it didn't have the same legacy problems in 2008 that Firefox did. I think Mozilla has done a remarkable job keeping pace with Google, taking this into account.
- masklinn 9y ago> I think Firefox hit full ES6 compatibility first among the browsers because there was this extra incentive to modernize the codebase. A number of ES6 additions were initially Firefox extensions (though some standard-track features like comprehensions also got removed).
- JosephLark 9y ago> something available in C++11 (that's C++ released in 2011) Nit: The standard was finalized in 2011 - August 2011 to be more specific, so quite late in the year. Full compliance in various compilers was not achieved for quite some time after that - MSVC being quite problematic in that regard. Major projects - esp. those compiled on multiple systems across several compilers, like Firefox - absolutely could not just go ahead and start using C++11 in 2011. I was really into native development around that time, and C++11 was the first time I was exposed to the complexities and gotchas around standardization vs. implementation. I've stopped paying as much attention since, but I believe C++14 fared much better.
- Manishearth 9y ago> I was surprised at the time that so much of the code was ES6. FWIW internal firefox code has had ES6-like concepts before ES6 itself; and many of these made it into the final spec in some form.
- coldtea 9y ago>I think Firefox hit full ES6 compatibility first among the browsers Wasn't it Webkit that hit that first? Whereas Firefox at the time was just 93%. https://twitter.com/webkit/status/728643624464883712?lang=en https://twitter.com/webkit/status/728643624464883712?lang=en
- eric-hu 9y agoYou could be right. I tried to fact check myself and couldn't find a reference to which browser hit 100% first. I did see this article about safari shipping modules first, though: https://www.contentful.com/blog/2017/04/04/es6-modules-support-lands-in-browsers-is-it-time-to-rethink-bundling/ https://www.contentful.com/blog/2017/04/04/es6-modules-suppo...