Re: alive e/ken style projects?
Bill Frantz <[email protected]> Tue, 13 Oct 2015 18:14:45 -0700
| Newsgroups | gmane.comp.capabilities.general |
|---|---|
| Message-ID | <r422Ps-1075i-C39D254C821141E797485AE816B4B7A4@Williams-MacBook-Pro.local> |
On 10/13/15 at 3:27 PM, [email protected] (Raoul Duke) wrote: >>Javascript has promises. Can't get much more alive than Javascript. Is it still cool? :-) > >Well, probably mostly "no", if you ask me. :-} I realize it is >inevitable (we do React now, don't you know), but that doesn't mean >I'm overjoyed about it. When I can get Flow & Babel working then it is >less bad, but still. Also, does/will it support pipelining, or other >such advanced coolness? Chip Morningstar wrote on the esdiscuss list: "My sense is that many in the JS community seem to regard promises principally as an abstraction for dealing with asynchrony. While they certainly *are* that, the original driving use case for their invention/adoption (when I first encountered them, 25 or so years ago) was as an abstraction for dealing with network latency, and I believe this consideration loomed large in the minds of some of the TC39 committee members who championed the adoption of the ES6 Promise API in its current form. In contrast to many of the closure-based callback mechanisms which have been brought up variously as alternatives to promises or as sugarings or implementations of them, one of the great virtues of promises is that they can be pipelined. In particular, they can be pipelined over the network when invoking operations on remote objects, which means that a sufficiently clever or aggressive implementation can speculatively deliver requests over the network to the result of an earlier request before that result has been determined, potentially short circuiting one and potentially many network round trips. This can yield substantial (several orders of magnitude, in some cases) speedup to some kinds of heavily networked applications. This is easy to lose track of if you're just thinking of promises as a different notation for writing callbacks." So I would say, yes. But the Javascript community largely hasn't discovered it yet. :-) Cheers - Bill ------------------------------------------------------------------------- Bill Frantz | Airline peanut bag: "Produced | Periwinkle (408)356-8506 | in a facility that processes | 16345 Englewood Ave www.pwpconsult.com | peanuts and other nuts." - Duh | Los Gatos, CA 95032