tc39 / proposal-generator-arrow-functions

ECMAScript proposal: Generator Arrow Functions
115 stars 5 forks source link

Where to support this proposal to draw more attention? #8

Open xialvjun opened 3 years ago

Rob-pw commented 3 years ago

I would support either the one which results in an ASI hazard (though I am unaware of what this means), or my personal favourite - which fits in with my coding style (which if anyone wishes to adopt I dub 'negative indentation' - great for small screens needing lots of thin tabs and short line widths, good for vertical scrolling and minimal eye saccades):

const
  generator
 = () => *
  {  }
;

OR (and this might work?):

const
  generator*
 = () =>
  {  }
;
xialvjun commented 3 years ago

I think *() => {} is better, just like async () => {}. But I worry people may write 1 * () => {}

Rob-pw commented 3 years ago

Oh, I see. If they really wanted 1 * () => {} they could achieve such using 1 * (() => {}) in a similar way to destructuring works when the variables have already been declared (but the form you mention is the one I instinctively go for):

let value, value2;

({ value
 , value2 } = someObject)

But as to the actual issue - how to gain more attention, I'm not sure, but perhaps negotiating some approach to bring forward might help?

mvduin commented 3 years ago

(moved comment about ASI hazard to #2 as suggested below)

SpadeAceman commented 3 years ago

2 would be a better place to debate proposed syntax.

As for drawing more attention to this proposal, that doesn't seem like a good idea while we're still debating syntax. I don't think this proposal is realistically going anywhere until there's a solid decision on the syntax to move forward with. Only then would it make sense to draw wider attention to it.

StiliyanHoody commented 11 months ago

Please fix