Hacker News new | ask | show | jobs
by tmandry 2490 days ago
Not necessarily. They're an implementation detail of the compiler, and aren't fully baked yet to boot.

But there's plenty of reason to want generators, including the fact that they let you build streams. And the fact that async/await relies heavily on them has pushed the implementation much closer to being ready. I hope we get them at some point!

1 comments

They are available in nightly - https://doc.rust-lang.org/beta/unstable-book/language-featur... - but are very unstable.

I think "at some point" is the best answer :)

To be clear on how unstable: they have not received an actual RFC yet, so they’re barely designed at all. It will be some time before they’re stable, as in some sense, they haven’t even started the process.

I’d imagine that they would go through the stages faster than many other features, though, given that they implementation will have received a lot of testing via async/await.