Proposal: Additional Meta Properties for ES7

John Lenz concavelenz at
Mon Mar 2 17:30:43 UTC 2015

I was recently discussion Promise optimizations (specifically, that in any
"then" chain at least one Promise object is created that goes unused), this
could be solved by some metadata that indicated whether the result of the
function would be consumed:

Promise.prototype.then = function(a, b) {
   if (function.called_from_void_result_context) {
     return undefined;
   /* current behavior */

// example

somePromise.then(); // no chaining promise created by then

var x = somePromise.then(); // chaining promise created
x.then(); // no chaining promise created

I'm not really sure what impact this would have on the VMs but I found it
an interesting idea.

On Thu, Feb 26, 2015 at 2:47 PM, Allen Wirfs-Brock <allen at>

> Here is a new proposal for some additional meta properties that should be
> considered for ES7
> I've added this to the agenda for next months TC39 meeting but pre-meeting
> discussion is always welcomed right here.
> Allen
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list