[rust-dev] Interfaces!

Niko Matsakis niko at alum.mit.edu
Thu Jan 5 11:07:45 PST 2012


This looks nice.  One question: the syntax used in the docs appears 
inconsistent to me.  If I write "impl foo for bar" does that define an 
impl named `foo` with no interface, or an impl of the interface `foo`?  
I believe the former.  In that case, I write "impl of foo for bar" to 
get an impl of the interface `foo` named `foo` for the type `bar`? (or 
"impl bar_foo of foo for bar" if I want to give the impl a different 
name).  Is that correct?


Niko

On 1/5/12 6:14 AM, Marijn Haverbeke wrote:
> Interfaces and implementations are mostly working now. They aren't
> snapshotted yet, and there are some details such as binding methods
> that don't work yet, but there should be enough implemented to play
> with. Please file any bugs that you find in this, and assign them to
> me.
>
> A description of the syntax and semantics can be found at
> https://github.com/graydon/rust/wiki/Interfaces
>
> Best,
> Marijn
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev



More information about the Rust-dev mailing list