3 ms·
I see, that's interesting and it seems powerful. But I would never use such a feature, it increases the code mental load (what you should know before being abl
by linkdd 6y ago
I see, that's interesting and it seems powerful.
But I would never use such a feature, it increases the code mental load (what you should know before being able to read the code).
From one codebase to another, I can't even keep the same assumptions.
- _cart 6y agoYeah implementing traits for functions is rarely advisable. However in this one very specific case (what amounts to dependency injection) it gives us very nice clarity and ergonomics. I'll take that over the macros everyone else is using in this context, or the expensive "runtime reflection" other languages might use to do the same thing. At least its still "normal" static rust code.