Followup: modularity, WebExtensions, and going faster

David Teller dteller at mozilla.com
Wed Oct 12 13:01:28 UTC 2016


On 12/10/16 14:41, Gijs Kruitbosch wrote:
> In summary, I'm sympathetic in principle to wanting to do more static
> checking on our codebase, but I think "rewrite all the things in other
> technology X" is the wrong starting point for achieving that goal. There
> might be other reasons why (progressively) rewriting stuff is desirable,
> but I don't think requiring that rewrite for the static checking is an
> expedient way of getting the static checking, nor does wanting static
> checking per se justify a rewrite.

Good, because that's definitely not what I have in mind. I'm writing that:

1/ JS static checking is currently being planned – I'm not trying to
argue for or against it in this thread, or detail the plan, but if you
wish, we can do that in another thread;

2/ if we have poor modules, static checking is mostly going to confirm
that we have poor modules, but if we have better modules, static
checking is going to be more useful.

I agree that static type-checking is mostly orthogonal with the choice
of a way of modularizing the code (regardless of whether this "way" is a
specific technology, a set of review guidelines or anything inbetween).
On the other hand, I strongly believe that supporting strong typing
(note that I didn't write "static typing") at API boundaries is important.

> Finally I'll note that the existing WebExtensions APIs are very very >
very far from enough to write a browser with. Benjamin already
> acknowledged this. We would need to write new ("proprietary" in the
> not-specced/in-general-web-use sense) APIs. The implementations of
> WebExtensions APIs are not currently type-annotated (that I've been
> able to see when reviewing them, anyway), and so AFAICT "switching to
> WebExtensions" would just be shifting the annotation problem to the
> layer that implements such new APIs.

As a side-note, you may be aware that Alexandre and Vivien already have
a prototype of a browser based on Gecko and WebExtensions. If you wish
to discuss feasibility of writing such a browser, or what is missing
from WebExtensions to do so, you should discuss it with them.

Cheers,
 David



More information about the firefox-dev mailing list