Hello,
How about to create an instance with class.new like in Ruby, because in the
class is a new method?

     class  cat {
         priv {
             let mutable x : int;
             fn meow() { log_err "Meow"; }
         }

         let y : int;

         new(in_x : int, in_y : int) { x = in_x; self.y = in_y; }

         fn speak() { meow(); }

         fn eat() { ... }
     }


     let c : cat = cat(1, 2).*new*;
     c.speak();
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to