by stouset · 3y ago · 0 comments
All that aside,
> Especially when the solution is so simple.
This is completely unwarranted and presupposes incompetency or apathy on the Rust dev team, either of which couldn’t be farther from the truth.
Designing programming languages is hard and full of tradeoffs. While we can of course disagree about those tradeoffs, “simple” changes like these are never actually simple in practice and involve complex sets of tradeoffs that invariably have been discussed to obscene lengths. Even “simple” workarounds often commit to implementation guarantees that language designers are hesitant to make until they’re certain it won’t box them into a corner in the future.
Put bluntly, anyone who asserts that a programming language design change is “simple” is only highlighting their own ignorance on the subject.
You can implement that for your types. Deepsize crate implements the trait for a few popular libraries.
You can derive the trait in your structures and it will work for the few structures that happen to contain only your structures and the few hand picked structures supported by the deepsize crate.
And then? What about the 99% of the other cases? Adding a trait impl is acceptable. Wrapping all the other types not much