Re: Re: A few module ideas

2017-08-20 Thread James Browning
> export values are dynamic today! you can do: > let lib = null; > export default lib; > loadScript("foo").then(o => lib = o); > but what cannot be dynamic, is the set of export names, which shapes the > module. Cariday, while interesting the main problem with this approach is it doesn't

Re: Re: A few module ideas

2017-08-20 Thread Andrea Giammarchi
I've solved this (for my needs) long time ago, the pattern is the following: ```js export default new Promise(async $export => { // await anything that needs to be imported // await anything that asynchronous // finally export the module resolving the Promise // as object, function,

Re: Re: Defer expression

2017-08-20 Thread dante federici
kai zhu has a good example of solving async order problems explicitly, as opposed to banking on any defer or timeout to figure it out. I'm a little curious of what you mean by "something that cannot run immediately". If it can't be run immediately, then there should be *something* you can hook

Re: Re: A few module ideas

2017-08-20 Thread dante federici
- Unable to load classic scripts (and other types of resources statically e.g. conditional modules) as part of the module graph How are conditional imports static? In both examples I see the module as being async, and therefore every dependent module is async. Your "dynamic but static" is

Re: Are objects values?

2017-08-20 Thread Michael Dyck
On 17-08-19 01:34 PM, T.J. Crowder wrote: An ECMAScript *language type* corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language. The ECMAScript language types are Undefined, Null, Boolean, String, Symbol, Number, and Object. An *ECMAScript

Re: A few module ideas

2017-08-20 Thread Caridy Patino
export values are dynamic today! you can do: let lib = null; export default lib; loadScript("foo").then(o => lib = o); but what cannot be dynamic, is the set of export names, which shapes the module. /caridy > On Aug 20, 2017, at 8:57 AM, kai zhu wrote: > > for the

Re: A few module ideas

2017-08-20 Thread kai zhu
for the forseeable future, the only practical solution i see to these frontend performance issues is to avoid using es modules, and revert to the simple, old-fashioned method of assigning libraries to the window namespace. On 8/20/17, James Browning wrote: > These are

Re: Re: Are objects values?

2017-08-20 Thread Bruno Jouhier
@T.J. Going back to your original post: According to the definitions that I gave, objects are not values (they are mutable) but they **have** a value. Their value is their identity which is a memory handle (a reference) in JavaScript. Objects are **more** than their value; they are identity +