Module isolation

Mark S. Miller erights at
Mon Jan 18 08:51:48 PST 2010

On Mon, Jan 18, 2010 at 8:42 AM, Brendan Eich <brendan at> wrote:

> On Jan 18, 2010, at 4:38 AM, Mark S. Miller wrote:
> Obviously, I will have many positive things to say about the Valija
> approach for accommodating legacy. In fact, it was invented in order to cope
> with the "highly popular Prototype library" you mention below. However, the
> picture is not as rosy as "a burden [only] on implementors". The semantics
> of computing between Valija contexts are complicated, in similar but
> different manner to how the semantics of JS across frames is complicated
> today. If there's interest, I can present Valija with slides 10-15 of <
> Perhaps Valija is not the last word on this approach :-/. There's the
> system Adam Barth is developing -- have you checked that out?
> Yes. AFAICT, it is solving a different problem.

>> * The highly popular Prototype library, and a lot of extant code,
>> modifying primordials. If all such code must be rewritten to work in/with
>> modules, then modules have a steep adoption hill to climb.
> I don't quite understand this. Prototype does not currently work with
> modules, so some rewrite is necessary in any case. As long as we're talking
> about future Prototype, my impression is that they wanted to migrate away
> from mutating primordials eventually anyway.
> Tobie et al. may want to, but I know many *users* of Prototype who do not.
> We're talking about a large number of actual uses, some of which might want
> to migrate into a module, not necessarily be used cross-module. The cost of
> doing so is low if primordials in that module can be mutated. It goes way up
> if they can't.
> Huh? I don't understand this. If they wish to be in the same
mutated-primordial-sandbox as Prototype, as you indicate and seems likely,
then it would not help them if Prototype were packaged as a module and
modules were the unit of primordial-mutation-sandboxing. Why should they not
just load the existing Prototype into their frame the old fashioned way?

Or, yes, they could do the Valija thing, in order to multiplex a frame among
multiple sandboxes. But a Valija sandbox is not a module. I think we're
confusing levels.

> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list