Am 14.10.2012 um 22:44 schrieb Niko Matsakis <[email protected]>:

> What Brian wrote looks about right to me.  I don't think any of the deriving 
> ideas we had discussed could accommodate that particular example, though 
> clearly it's not hard to imagine how one might do so.  Or perhaps use a macro.
> 

Yes, I am glad this has been brought up again. I was thinking about this awhile 
back and put some drafty ideas into the 'Delegation' section of 
https://github.com/mozilla/rust/wiki/Proposal-for-interfaces 

The main idea was to allow for a syntax that basically says "implement that 
interface for self by delegation to member <foo> or a pure call"

The page is outdated. However,I still think having support for automatic 
delegation could prove to be useful. I remember that there was a talk on IRC 
with the conclusion to implement this via macros later.  Since it this feature 
has come up again I wonder wether that still is the correct answer.


Cheers,



Stefan. 

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to