Make things like Reflect an import instead of a global?

/#!/JoePea joe at
Wed Aug 17 01:52:12 UTC 2016

Seems like when the ES6 Modules became official that it would be a good
idea to *not* define more globals in the language, and instead spec things
to be modules, f.e. something like:

import {apply} from 'Reflect'
// insead of
const {apply} = window.Reflect

This would also be a pattern for programs that use the JS engine to follow:

import {define} from 'CustomElements' // in browsers
// instead of
const {define} = window.customElements

Maybe a symbol would be needed for any modules that are native?

import {define} from '#CustomElements' // # means native module

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

More information about the es-discuss mailing list