return when desugaring to closures
petermichaux at gmail.com
Thu Oct 9 15:31:39 PDT 2008
On Thu, Oct 9, 2008 at 2:31 PM, Brendan Eich <brendan at mozilla.org> wrote:
> Sorry for the very tardy reply. You make good points in the abstract, and
> the messy language-specific details of existing semantics for functions not
> being clean enough deserves a better response than just "don't desugar".
> I stand by "don't desugar let to functions as-is".
I argued for "let" desugaring to "function" and I understand the
problems with "arguments", "this" and "return". In light of the
"lambda" idea below and that "let" could desugar to that more
intuitively (i.e. Tenent's principle) to "lambda", I think what I was
really asking/arguing for was an axiomatic definition of the language.
That is, "let" should should desugar to something more fundamental.
> I'm also pretty certain
> "don't add more modes or subsets to try to fix existing forms" is sound,
> since versionitis does not help us either keep the spec simple or specify
> the backward-compatible semantics in the full language.
This makes really good sense to me. Things like modes that affect
semantics of forms makes me uncomfortable.
> So, to avoid trouble, we've been thinking of new forms including a better
> function, call it lambda,
Please call it "lambda"! :)
> that has none of the compatibility baggage. I say
> "we" but really Dave Herman deserves credit for championing this.
Dave Herman for president!
> A "lambda"
> form has been a topic now and then for a while, on this list and in
> committee, and sometimes only as syntactic sugar (which would miss the
> opportunity for semantic reform) -- yet without it getting the breathing
> room it needs.
> Dave is working now in the
> space on the wiki. Don't throw stones, this is not in the harmony: namespace
> for good reason. Constructive comments welcome. And I still owe the list a
> story on wiki access that keeps Ecma happy and doesn't throw open the edit
> wars doors.
> Among the new strawman pages, the following are relevant and (I hope)
I wasn't sure if there was going to be a day when I saw these exciting
ideas as potential/maybe ideas that might/perhaps end up in
ECMAScript. I'm going to cross my fingers and start holding my breath
More information about the Es-discuss