Multiple generators improvements and syntax sugar

Seeking for champion

Proposal draft

to be honest I don't see much of a difference between

for (const item of multi[^alt]) …
const arr = [...multi[^other]];


for (const item of multi.alt()) …
const arr = [...multi.other()];

So where exactly is the benefit?

I'd say a quick switch of default iterator implementation. Adding an alias for a generator function. Skipping misleading function call as well.

Related question, is it possible to alias a function?

class Foo
  *bar() {}
  *baralias() (
  // Normally used like
  *barnormal() { return; }

The function call is not misleading at all, why do you think it is confusing?

Sure, you can just write

class Foo {
   *bar() { … }
   get alias() { return }


Foo.prototype.anotherAlias =;
1 Like