proposal-generator-arrow-functions icon indicating copy to clipboard operation
proposal-generator-arrow-functions copied to clipboard

Where to support this proposal to draw more attention?

Open xialvjun opened this issue 4 years ago • 6 comments

xialvjun avatar Jan 12 '21 02:01 xialvjun

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*
 = () =>
  {  }
;

Rob-pw avatar Jan 26 '21 03:01 Rob-pw

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

xialvjun avatar Jan 26 '21 03:01 xialvjun

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?

Rob-pw avatar Jan 26 '21 03:01 Rob-pw

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

mvduin avatar Jun 26 '21 04:06 mvduin

#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.

SpadeAceman avatar Jun 30 '21 14:06 SpadeAceman

Please fix

StiliyanHoody avatar Sep 19 '23 09:09 StiliyanHoody