David Teller
yoric.github.io · Personal blog · on HN since 2017
David Teller, a programmer formerly at Mozilla, writes about Rust, JavaScript tooling, language design, and Mozilla's history.
What HN saysHN commenters point to his post on why Mozilla removed XUL add-ons as the best account of that decision.
43HN people shared it
20linked it in comments
45stories submitted
1.7Kstory points
1 year agolast shared
2017people per year2026
Most-shared posts
- 1Why Did Mozilla Remove XUL Add-Ons?14 people · 401 points · first shared 2020 · 336 comments on HN
- 2Typestates in Rust (2018)8 people · 216 points · first shared 2018 · 73 comments on HN
- 3A Few Words About Async5 people · 99 points · first shared 2025 · 38 comments on HN
- 4Units of Measure in Rust, with Refinement Types5 people · 10 points · first shared 2020 · discussion on HN
- 5Possibly one step towards named arguments in Rust5 people · 8 points · first shared 2020 · discussion on HN
- 6Towards a JavaScript Binary AST4 people · 313 points · first shared 2017 · 205 comments on HN
- 7Coding for a Finite World4 people · 7 points · first shared 2023 · discussion on HN
- 8Thinkerbell: A minimal scripting language for the SmartHome (post-mortem)3 people · 4 points · first shared 2018 · discussion on HN
- 9About Safety, Security and yes, C++ and Rust3 people · 2 points · first shared 2023 · discussion on HN
- 10What would it take to add refinement types to Rust?2 people · 162 points · first shared 2024 · 94 comments on HN
- 11JavaScript Binary AST – Motivations and Design Decisions2 people · 4 points · first shared 2017 · discussion on HN
- 12A Brief History of Firefox Performance Optimization2 people · 4 points · first shared 2023 · discussion on HN
- 13Programming languages that blew my mind (2023)1 people · 370 points · first shared 2024 · 205 comments on HN
- 14Things to do before your project dies1 people · 96 points · first shared 2017 · 3 comments on HN
- 15Go Zero Values1 people · 3 points · first shared 2025 · discussion on HN
What HN people wrote when they linked it
Yoric · 2025-01-07
Got it, now it makes sense :)
I may accidentally have been inspired from your message when I wrote the following piece, yesterday: https://yoric.github.io/post/formal-ai/
IainIreland · 2020-12-16
I believe this is the best account: https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
michaelmrose · 2020-08-25
Chrome adopted multi core far sooner. A great if lengthy treatment here
https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
MaxBarraclough · 2020-01-27
> Exceptions are better than undefined behavior in coping with the former, but they still don't help you with the latter
That's not right. Exceptions are thrown reliably and are always 'noisy'. Undefined behaviour may go completely unnoticed for a long time. Code that wrongly throws exceptions tends to get fixed.
I've seen undefined behaviour in code samples in respected technical books. The code happened to work fine when using the MSVC C++ compiler and x84/AMD64 targets, and will probably continue to do so.
> The idea to “make invalid states unrepresentable” would give you an actual shot at this.
That's a pretty good summary of what type-systems research is aiming for.
Are you following 'typestates' in Rust? I think you might enjoy this article, if you've not read it already: https://yoric.github.io/post/rust-typestate/
imiric · 2023-02-10
Thanks for your comment. I'm commenting as a long-time user of Mozilla software--since the Netscape days--and I'm not familiar with the internal or technical reasons that led to these decisions, so I appreciate your perspective. My snarkiness is coming from a place of tough love and frustration with the current state of Mozilla, so allow me to push back against some of your points.
> Firefox is multiplatform, and good at it, and that's something Thunderbird needs as well
I get that, but why isn't the UI toolkit and whatever multiplatform support that Thunderbird needs, not abstracted away from the web browser dependencies? Maybe it is so, but from this article, it sounds like actual Firefox components are reused by Thunderbird, for better or worse.
> an email client needs to display web pages, so no matter what, a web engine is needed
Again, I'm not familiar with the internals, but surely the engine needed to render just HTML and CSS for purposes of HTML emails, is not the same engine needed to render modern web sites with JavaScript and all the overhead of related technologies. You do say that it's possible to re-use Firefox core without all Firefox features, so I would assume that this purpose-built engine for Thunderbird is a very, very minor subset of Firefox, that could be isolated in a way to not pull in all other Firefox dependencies.
And keep in mind, that all this is to render HTML emails, a minor part of the feature set of an email client, which many…
jd3 · 2021-05-12
Thanks for the reply! I'm a big fan of your work. I can only imagine the nightmare of trying to implement two separate XUL <=> HTML/CSS flex/box models in Servo/Rust.
For readers that are unaware, there is also a great blog post breaking down some of these points in finer detail [0][1].
I guess my question is — are there replacements planned for any of the legacy yet performant XPCOM interfaces / XUL elements like nsITreeView/tree? My tl;dr understanding of XUL trees is that the DOM is and always has been too slow to render millions of scrollable rows in a performant manner (bookmarks, thunderbird, etc.). Would it not be possible to re-implement the XUL tree logic in Rust, for example? Is the goal to completely get rid of all non-standards compliant elements in the long-run?
It seems like there will always be some custom elements necessary for a native desktop interface which can never be integrated into HTML...
"I’ve talked about this before, but things like panel, browser, the menu elements (menu, menupopup, menucaption, menuitem, menulist) don’t have HTML equivalents and are important for our desktop browser experience. While we could invent a way to do this in chrome HTML, I don’t think the cost/benefit justifies doing that ahead of the rest of the things in our list." [2]
..., yet I don't see much discussion about this anywhere.
I'm particularly interested because I'm currently working on a XULRunner project where a <tree> is central to the user interface…
ChrisArchitect · 2025-10-30
Actual article: https://yoric.github.io/post/quite-a-few-words-about-async/
chrismorgan · 2024-05-31
No, the XUL/XPCOM design, by its nature, became harder and harder to maintain, and there are also plenty of very specific and highly desirable technical improvements that it made completely impracticable, and which have been made since then.
https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/ is one article about this, and other information floats about the place too.
dannymi · 2024-02-09
>If Rust had a restricted subset which had a footprint compared to C
Take a look at "#![no_std]", a Rust feature.
If you do that, your Rust Hello World program will have 14 kiB (with no linker optimizations).
>and allows formal verification (including functional requirements)
See <https://rust-formal-methods.github.io/tools.html>.
Also, the Rust compiler can be used as a library and you can add whatever checks you want like that. See <https://yoric.github.io/post/uom.rs/> for an example (not used that much).
Also, I like <https://docs.rs/pre/latest/pre/attr.pre.html>. It allows you to define and then mandate specifying textual requirements (in addition to the usual conditionals).
scns · 2023-11-16
> The "enforce preconditions via types" is a common pattern in Rust
Called the Type State Pattern. Here are two links from my bookmarks:
https://cliffle.com/blog/rust-typestate/
https://yoric.github.io/post/rust-typestate/
samsquire · 2023-03-06
Mozilla abandoned XPCOM partly due to the runtime cost of marshalling between C++ and JavaScript.
https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
I wonder if the solution is transpiling. If Javascript was transpiled to Rust, there would be less data to copy. You would just have two API surfaces.
But you wouldn't have runtime Javascript execution, just the capability of running Javascript code at native performances.
yoasif_ · 2022-09-19
Context for the curious: https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
labrador · 2022-07-15
Interesting. That was a out-of-date misunderstanding on my part. I thought it was a binary JS AST. Thanks for the comment instead of just a negative vote
https://yoric.github.io/post/binary-ast-newsletter-1/
progval · 2021-09-28
I also hate they had to kill XUL addons, but they had good reasons to do so: https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
mftb · 2021-09-13
So when FF reduces customization by changing the extension system they are bad. When they let you customize the UI ad-infinitum through userChrome.css it's because, "its UI is THAT bad.". Right, got it, FF bad. Some of the devs who have worked on the FF extension system over the years both before and after the changes have blogged about why they had to do what they did, https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/, are security and maintainability difficult to grok? FF is large and has had to live in an increasingly hostile web for a very long time. As for your reasoning about why there are alternative browsers and ecosystems, it's simply not good. One of the main reasons people work on alternative browsers is they like making things. This is evident everywhere in Free Software/Open Source, where there are options for almost every part of every stack.
JoshTriplett · 2020-08-31
> like XUL depreciation
There were specific reasons for that: https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
grumdan · 2020-03-03
One example that comes to mind is type state [0]. I'm not aware of any other language (including those with support for dependent types, like Agda) where these properties can be checked without external static analysis tools and the problems they bring.
[0] https://yoric.github.io/post/rust-typestate/
sjrd · 2017-08-18
> If parsing is so slow, maybe browsers should be caching the parsed representation of javascript sources to speed up page loading, or even better: the bytecode/JIT-generated code.
This is addressed in the article: https://yoric.github.io/post/binary-ast-newsletter-1/#improving-cachin…
sfink · 2020-09-18
I hesitate to reply to this, because it's such a caricature of negativity. It's kind of a rollup of all of the crap that HN comes up with to fling at Mozilla. Everything has some kernel of truth in it, but it's pretty heavily buried.
1) The majority of developers at Mozilla are working on Firefox. Many more than 50. It is true that we have fewer staff than Google has working on Chrome (Mozilla is less than half, I heard rumoured?).
2) We did kill XUL extensions, after resisting for years. It would have been a self-inflicted fatal wound not to. https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/
3) Anyone who's had to make a decision of when to ship a product will be familiar with the things you need to juggle. There was a much earlier alpha that got close to shipping and then held back. You would have been less happy with that. There are later versions that would have been more complete, at the cost of maintaining two separate code bases longer. Massive opportunity cost. Was it shipped at exactly the right point? Almost certainly not.
1000 might seem like a large number to you, but we are a small organization relative to others in the same space; we can't keep a lot of extra bets going.
4) Superficially: uh, isn't that what bugs are? The only way to prevent your decisions from causing problems is to not make decisions, and then that's a bigger problem. Specifically with the signing, nobody forgot to sign anything, a cert expired. We screwed up.
The decision…
boogies · 2020-09-01
Oops. This is why I try not to rush HN comments. This one I did and tried to remove my partial list of complaints about Mozilla and left one element, that’s not the most important one.¹
Mozilla markets Firefox as ‘the only browser made for people, not profit’. But they’ve done the exact opposite time and time again. Virtually the single most prominent UI element, the omnibar, has been sold out to the single largest threat to the open web, the gatekeeper to the entire internet to the vast majority of its users. I don’t want to spend all day railing against Mozilla, as easily as I could, but I can easily find a couple other examples off the top of my head. The Mr. Robot scandal is another example of selling out and (not necessarily directly harming but very significantly) alienating users. And it’s been a few years since I’ve used FF as my main browser but I still remember every time I installed it on a new device going into settings and changing default after default to revert it back from a profit-seeking product to a personal tool, disabling telemetry, etc.
1: Although it does make a difference to me. I’d use pre-Chromium Edge if it was FLOSS, on my OS, and let me use Pentadactyl. The excuses for XUL’s removal — security, stability, and speed — don’t concern me: https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/ seems to claim it would allow someone to somehow steal my passwords. I’ve been using Palemoon for years and I don’t have any weird activity on any of…