W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: ISSUE-124: Futures / Order of parameters (was: Re: Request for JSON-LD API review)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 17 Apr 2013 09:56:49 -0700
Message-ID: <CAAWBYDDyyeidfw+aXWOn5z5Pj-LOdeUCcAEkMigrCnkCkdQWvA@mail.gmail.com>
To: Claus Reinke <claus.reinke@talk21.com>
Cc: Manu Sporny <msporny@digitalbazaar.com>, Markus Lanthaler <markus.lanthaler@gmx.net>, "public-script-coord@w3.org" <public-script-coord@w3.org>, public-rdf-comments <public-rdf-comments@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>, Linked JSON <public-linked-json@w3.org>
On Wed, Apr 17, 2013 at 9:17 AM, Claus Reinke <claus.reinke@talk21.com> wrote:
> In addition, I would like to see a tiny JS language extension that
> translates something like
>
>    let xresult <- doX(...)    ...
>
> (for then-able-returning doX) to
>
>    doX(...).then( function( xresult ) { ... } )
> so that I could write my nested callbacks without pyramids of doom,
> as in other functional languages (eg, Haskell, F#).

Your suggested transformation is crazytimes, because it means that
"let" isn't introducing a new variable at all!

~TJ
Received on Wednesday, 17 April 2013 16:57:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:12 UTC