4 ms·
>Did you know you don't have to use every feature? You can write perfectly valid and useful rust code without async or const fn or GATs or ? Do you use librari
by carlmr 4y ago
>Did you know you don't have to use every feature? You can write perfectly valid and useful rust code without async or const fn or GATs or ?
Do you use libraries from other people? Do you work on projects with others that like those features? Then I bet you'll have to use those features, whether you want to or not.
This isn't Rust specific, mind you, but any feature added that is used and has an effect on the API will be forced onto you at some point.
Since async popped up it's become really hard to avoid. And most packages have converged on Tokyo as an executor.
If you use these libraries they will not only force you to use async, they will even force you to pick their executor.
The introduction of GATs will impact interfaces. They will be forced onto you.
I'm not saying this shouldn't happen, in some way it's inevitable for it to happen. But it can be quite harrowing if you're not a sole developer doing all their own libraries.
This is kind of like the "if you use C++ properly you can create safe code in it" mantra. Which again, yes, but only if you have total control of the project, don't have any other developers on it that might impact your design, and don't use libraries.