[rust-dev] Can traits define instance vars?

2013-12-02 Thread jeti789
Hello, I lately had a look at Rust and really liked it in many ways. Rust has really everything Im missing in Go ;-). There is something about traits I would like to ask I cant see from the manual. Question is whether you define instance variables in traits or abstract variables like Ceylon and

Re: [rust-dev] Can traits define instance vars?

2013-12-02 Thread Eric Reed
Hi Oliver, Glad you're liking Rust so far :) Currently traits can only have methods (functions that have a self parameter) and associated functions (functions without a self parameter). There's a proposal to add inheritance on structs to Rust, which would allow a trait to extend a struct and

Re: [rust-dev] Can traits define instance vars?

2013-12-02 Thread spir
On 12/02/2013 11:12 AM, jeti...@web.de wrote: Hello, I lately had a look at Rust and really liked it in many ways. Rust has really everything I'm missing in Go ;-). There is something about traits I would like to ask I can't see from the manual. Question is whether you define instance variables