Closed ajklein closed 8 years ago
This spec is now completely outdated as of the last meeting. I will be entirely rewriting it (again) to reflect the committee's new wishes, which are to preserve a slice of source text from the beginning of the first token of the appropriate structure to the end of the last token. This should address your concern about function names. If so, please close.
edit: Resolution in TC39 meeting notes: https://github.com/tc39/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#conclusionresolution
Ah, thanks for the pointer, that indeed takes care of my concerns.
I see the following NOTE at the bottom of the new spec:
"NOTE 2: Do we preserve function name? If so, do unnamed FDs and CDs in export default position cause problems here?"
I think the spec needs to specify this, since the presence (or lack) of function names has semantic meaning. Consider:
Similarly, for named expressions, including the name is important in case the function wishes to recurse.