From: es-discuss <[email protected]> on behalf of David Herman 
<[email protected]>

> So I think we should consider doing the same thing as we do for 
> ExpressionStatement:
> ...
> This actually results in no net change to the language syntax, but it allows 
> us to change the scoping rules so that function and class declarations scope 
> to the entire module:

This seems nice; a tentative +1. I like how surgical of a change it is.

Personally I have not found the current state confusing. `default`, just like 
`yield` or `return` or `throw` or  others, was a fine signifier for me that 
we're entering an expression context. But since others don't seem to have 
adapted, perhaps this will help them. And it is definitely convenient in cases 
where you want to refer to the default export elsewhere within the module.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to