Jasper: none of those things are legal in the current spec
On Mon, Jun 16, 2014 at 1:41 PM, Jasper St. Pierre <jstpie...@mecheye.net> wrote: > > On Mon, Jun 16, 2014 at 1:22 PM, Rick Waldron <waldron.r...@gmail.com> > wrote: > >> >> On Mon, Jun 16, 2014 at 1:05 PM, Calvin Metcalf <calvin.metc...@gmail.com >> > wrote: >> >>> e.g. something like >>> https://gist.github.com/calvinmetcalf/9252f41bf6e3c8b4add7 >>> >> >> re: >> >> let { foo, bar } = import "library"; >> >> Ignoring the UnaryExpression ambiguity, what happens here: >> >> >> // library.js >> export const MAX_VALUE = 1023; >> >> >> // program.js >> let { MAX_VALUE } = import "library"; >> MAX_VALUE = 1; >> > > Seems like a straightforward thing to me. "let" creates a local binding > for the scope of the file. It shouldn't be anything different from: > > function importMyLibrary() { > let module = import "library"; > return module; > } > > let { MAX_VALUE } = importMyLibrary(); > MAX_VALUE = 1; > > Or: > > function importMyLibrary() { > let module = import "library"; > let MAX_VALUE = module.MAX_VALUE; > return { MAX_VALUE: MAX_VALUE }; > } > > >> Rick >> > _______________________________________________ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> >> > > > -- > Jasper > -- -Calvin W. Metcalf
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss