When I mention struct members I'm saying that in order for a struct to satisfy trait properties (explicitly conforming to the interface, not implicitly like Go), the struct must have implemented the functions for the trait and also contain the required members.
Looking at a few more examples, I think what I'm looking for here is a mixin for composition ( inheritance would not be too relevant here) a la Scala's, or a purpose-made Python asbtract class that defines class members and methods pertaining only to those members. On Fri, Sep 20, 2013 at 2:55 PM, Oren Ben-Kiki <[email protected]> wrote: > How about allowing anonymous fields, like go does? It seems to provide > most of the benefits at very little language complexity cost. > -- Andrés Osinski http://www.andresosinski.com.ar/
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
