Ixrec / rust-orphan-rules

An unofficial, experimental place for documenting and gathering feedback on the design problems around Rust's orphan rules
Apache License 2.0
201 stars 3 forks source link

How much would delegation help? #4

Open Ixrec opened 6 years ago

Ixrec commented 6 years ago

Sometimes, newtypes are tedious to implement. There's a proposal for adding "delegation" to Rust which is expected to help with that.

Current delegation RFC: https://github.com/rust-lang/rfcs/pull/2393

This issue is for gathering feedback on whether or not delegation actually would help solve cases where newtypes are tedious to implement today. In particular, whether certain extensions to the proposal would be required to solve your use case (e.g. delegation of associated types, static methods, etc).

shepmaster commented 5 years ago

See also Is it considered a bad practice to implement Deref for newtypes?