Hacker News new | past | comments | ask | show | jobs | submit login

You're not wrong, but making self be the last argument would cause confusion for almost everyone coming from other languages, and for Rust it is too late to change that now. You could special case the behavior of the method call syntax to operate that way without breaking backwards compatibility (at the cost of making going back and forth between that syntax and the fully qualified call no longer being a straight forward syntactical transformation).



It would still break backward compatibility. As a trivial example,

    {println!("first"); 1u32}.wrapping_add({println!("second"); 1});
currently prints "first" before "second", but would switch.

But this could theoretically be done at an edition boundary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: