Idea for Strawman: separate the core standard library itself into modules

John Barton johnjbarton at google.com
Mon Sep 22 17:03:23 PDT 2014


A way to start would add new built-ins only in modules.
jjb

On Mon, Sep 22, 2014 at 12:15 PM, Isiah Meadows <impinball at gmail.com> wrote:

> Transitioning the native API to modules is more of a proposed long term
> goal of this proposal. It'll take years to fully realize.
> On Sep 22, 2014 3:10 PM, "Isiah Meadows" <impinball at gmail.com> wrote:
>
>> @Brendan I'm aware of that pattern. For now, I'm more concerned about the
>> option of modules. It would be nice to import the standard library features
>> you need, and if, for some reason, one of the API natives get overwritten,
>> you have a fallback.
>> On Sep 22, 2014 1:18 PM, "Brendan Eich" <brendan at mozilla.org> wrote:
>>
>>> Tab Atkins Jr. wrote:
>>>
>>>> OnMon, Sep 22, 2014  at 9:04 AM,  Domenic Denicola
>>>> <domenic at domenicdenicola.com>  wrote:
>>>>
>>>>> >  From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf
>>>>> Of Isiah Meadows
>>>>>
>>>>>> >>  I know this would break a lot of backwards compatibility
>>>>>> completely, so this is purely hypothetical, and I expect this to not have a
>>>>>> realistic chance anytime soon.
>>>>>>
>>>>> >
>>>>> >  Anything that breaks backward compatibility will not have a chance,
>>>>> realistic or otherwise,*ever*.
>>>>>
>>>>
>>>> To square this with Matthew's response, the original idea was to
>>>> *also*  expose the core functionality as modules, to give you the
>>>> ability to grab "clean" versions of any standard functions you wanted,
>>>> while the preexisting global versions would still be there.
>>>>
>>>
>>> Right!
>>>
>>> Isaih, this is good news: you can't insist on removing stuff, but if you
>>> put the cleanups and better organization in new clothes, the old drab ones
>>> will fade into disuse (even if they don't ever go away).
>>>
>>> This is kind of a "law of the Web." It turns out compat does break, and
>>> no one notices (much), over very long timeframes. At least, we saw this
>>> going from the early Web to the modern days, with a few things (corner
>>> cases in JS and CSS table layout). But these were never predictable, or
>>> major.
>>>
>>> With strict-by-default modules, we can hope for 'with' to whither away
>>> over a decade. I wouldn't bet on it, since strict mode is still opt-in and
>>> will be for <script>, forever.
>>>
>>> /be
>>>
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140922/0541c835/attachment.html>


More information about the es-discuss mailing list