|
|
|
|
|
by scudd
1914 days ago
|
|
Is there any thought to including a default executor in the standard library? I think it's kind of an obstacle for beginners when the language/stdlib provide all the tools to write async code, but not to run it. I saw discussed in this talk the intent in allowing developers to provide their own executor based on the specifics of their use case:
https://youtu.be/NNwK5ZPAJCk?t=1107 This makes sense to me; however, I feel like the defacto at this point is that most people are using tokio. Is there a possibility that a default executor could be provided, and allow developers to override it with a custom library should they chose? |
|
The problem is that a standard library is a heavy burden for a language, and a huge risk for its longevity (think 40 years from now). It promises that the first stable release of any feature will work forever, and never change. It's an unrealistic promise for anything non-trivial.
In other languages it often played out like this:
1. std added a feature,
2. it turned out that it wasn't the best API, but it couldn't be fixed,
3. people fed up with the poor std API wrote a replacement,
4. everyone has to be reminded "don't use the std version, use the replacement instead" forever.
Rust jumps straight to the point 4.