Claude Pache (2014-02-25T00:18:39.000Z)
Le 25 févr. 2014 à 00:32, Nick Krempel <ndkrempel at google.com> a écrit :

> On 24 February 2014 23:30, Nick Krempel <ndkrempel at google.com> wrote:
> The possibility of a "yield" without an assignment expression meaning "yield a hole" might be left open for the future (so some clients would treat it the same as "yield undefined", but those who care to distinguish could do). There would need to be a disambiguation rule for expressions beginning "yield /" however.
> ...and presumably "yield +", "yield -", so maybe it's too ugly.
>  

Personally, I consider that the impossibility to "yield a hole" must be considered as a feature, not a bug. Holes are useful in order to have consistent results for `Array.from([1, , 3])` (i.e., getting an exact copy), but their use should not be encouraged. (Note that, if you really want to, you can always (painfully) wrap a generator producing sentinel values with a hand-made iterable that forwards the results, transforming sentinel values into holes in the process.)

—Claude
domenic at domenicdenicola.com (2014-03-02T22:44:14.110Z)
Personally, I consider that the impossibility to "yield a hole" must be considered as a feature, not a bug. Holes are useful in order to have consistent results for `Array.from([1, , 3])` (i.e., getting an exact copy), but their use should not be encouraged. (Note that, if you really want to, you can always (painfully) wrap a generator producing sentinel values with a hand-made iterable that forwards the results, transforming sentinel values into holes in the process.)