tc39 / proposal-ptc-syntax

Discussion and specification for an explicit syntactic opt-in for Tail Calls.
http://tc39.github.io/proposal-ptc-syntax/
169 stars 8 forks source link

Current syntax proposal fails to allow or disallow various necessary productions #10

Closed efaust closed 8 years ago

efaust commented 8 years ago

The current PTC spec says that it's not a tail call to make a call that would otherwise be in tail position inside

There is currently nothing in the stc proposal that forbids return continue in these places.

Further, the current spec allows

a || b()

to be in tail position, which we do not allow.

I think the dream of using a grammar parameter might be over. We either need to wind [ReturnExpr] all the way through StatementList and into TryStatement, or to just add Static Semantics sections to further clarify. However, using those sections to refine the current grammar is somewhat misleading. I guess there is already precedent for this kind of thing.

littledan commented 8 years ago

These issues are all fixed in the current revision.