return when desugaring to closures
Mark S. Miller
erights at google.com
Thu Aug 21 19:57:10 PDT 2008
but don't, is "Tennent Correspondence":
It is the absence of this regularity that blocks so many attempts to
desugar other constructs into functions.
We don't have Tennent Correspondence because of misfeatures like the
mechanics of break, return, continue, this, arguments, and var. We
can't fix these, but we should avoid making the problem worse. When
you find yourself in a hole, first stop digging. The old es4 "this
function" violated Tennent Correspondence and would make the hole
deeper. I'm against.
More information about the Es-discuss