Y
Hacker News
new
|
ask
|
show
|
jobs
by
jessaustin
3408 days ago
Since python has had generators that "are just functions that yield, without special annotations" like, forever, I was surprised when vanilla JS decided generators need more punctuation.
1 comments
kenOfYugen
3408 days ago
They had to, since changes cannot break backwards compatibility with the legacy web.
link
jessaustin
3408 days ago
That seems plausible, but what would "yield" have meant before?
link
WorldMaker
3407 days ago
It might have been a function or variable name. In finance and farming domains it's a somewhat likely function/variable name.
link