> See, even after I knew the rules it was too confusing. Can we go back
> to using "as"?
> 
> import draw as drawGun from Cowboy;

This is an incomplete suggestion. What do you want the full syntax to be for 
multiple imports? Force the user to write a separate one on each line? Bracket 
them? Comma-separate without bracketing?

Whatever syntax you pick, "as" starts upping the syntactic overhead. The 
destructuring notation is pleasantly terse and consistent with destructuring.

[FWIW, here's how I would conceptually distinguish the two sides of the ":" 
token. The LHS is a fixed label. When you write an object literal, you're 
creating a property with that fixed label. When you are destructuring an 
object, you are selecting out that fixed label. When you are importing, you are 
requesting the import with that fixed label. The RHS is the varying part.]

Dave

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to