Hacker News new | ask | show | jobs
by shadowmint 2701 days ago
I know, but I still struggle to get a handle on the state of it really.

What is going on with futures 0.3? Why is everyone still using 0.1?

How does that relate to these issues?

It superficially appears like the whole async story is still in a concept stage...

4 comments

> What is going on with futures 0.3? Why is everyone still using 0.1?

Futures 0.3 uses nightly only-features that are landing in Rust within (hopefully) the next two releases of Rust. Namely, Futures 0.3 is a way to experiment with async programming using the async/await syntax.

> Why is everyone still using 0.1?

Futures 0.3 is still in flux—but settling down in recent weeks—and is relying on nightly-only features. Futures 0.1 is used heavily in Hyper and Tokio, but we intend to move to Futures 0.3/std::future::Future when they're available on stable or shortly thereafter.

(The Tokio and Hyper projects take backwards compatibility _extremely_ seriously.) (Disclaimer: I help maintain Tokio/Hyper, but am nowhere near are prolific as the main authors.)

It's the open source approach to upgrading. All the cool kids are focused on version N+1, which doesn't work yet. The users still on version N don't get support any more because only losers use version N. You see this pattern frequently in open source. The Python 3 debacle spent five years in that state.

Commercial products tend to avoid this. Sales of version N go way down before version N+1 is generating revenue. Overall revenue drops during the transition. That's not good.

Note that this isn't what's happening here; tokio is explicitly supporting "version N" in your terminology. Which is why your parent is asking why people still seem to be using the "old" version.

(Also, there's a compatibility layer, so even the people that want to play with the shiny new N + 1 can do so, even though it's not explicitly directly supported.)

> What is going on with futures 0.3? Why is everyone still using 0.1?

AFAIK becaue tokio isn't upgrading until some issues are ironed out. As long as tokio is on 0.1 the rest of the community will be on 0.1 too.

At least 0.2 has been yanked. I started learning futures when 0.2 was already defacto dead (which wasn't documented anywhere, but luckily people at the local Meetup knew), and I kept wondering why no packages were using it, and a lot of compatibility errors cropped up.