I am following Rust only for few month. Was the alternate syntax Trait::method(object, other parameters) discussed?

It will be sometimes useful to write Clone::clone(x) instead of x.clone() or (&x as &Clone).clone().

J

On 03/13/2014 07:36 PM, Patrick Walton wrote:
On 3/13/14 11:35 AM, Daniel Micay wrote:
Existing problems with the language aren't a reason to add new problems.

I don't think the coercion is much of a problem; at least, not a fixable
one. Dot notation for method syntax in a systems language that supports
values pretty much requires some sort of coercion. (Having to write
`(&mut my_vector).push()` is a non-starter, sadly, as much as the
compiler writer in me wants to remove all that code...)

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to