Nine Rules for Elegant Rust Library APIs

I have been stumbling upon that advice elsewhere already. I wonder: Isn't this something the compiler should do rather than every programmer of generic functions? Is the compiler really stuggling so much with big generic functions that we must support it (and make our code less readable)? Is it planned to improve that situation or is this problem not solvable in an automated fashion (for some reasons that I may not be aware of)?

I think I remember that even std uses these splits into generic and non-generic part, so it seems to be really important.

5 Likes