Import Expressions

Brendan Eich brendan at
Fri Jan 31 13:52:23 PST 2014

Calvin Metcalf wrote:
> Yes

The smell of expressions which evaluate depending on control flow not 
matching both branches preloading is enough that TC39 defers this and 
sticks to the ES6 grammar as proposed. We need to see enough clear 
use-cases where it wins to have import expressions, *and* there's no 
blow-back from both loading.

> On Jan 31, 2014 4:30 PM, "Domenic Denicola" 
> <domenic at <mailto:domenic at>> wrote:
>     Just to be clear: this is for an ask such that
>     ```js
>     var foo = Math.random() > 0.5 ? import 'bar' : import 'baz';
>     ```
>     loads both `'bar'` and a`'baz'` every time.

More information about the es-discuss mailing list