Interesting idea; in that case, one could string together any series of functions - basically, `.` would become the equivalent of `|>` (or whatever other name you want to call it). That is, instead of writing `baz(bar(foo(x), y), z)` one could write `foo(x).bar(y).baz(z)`. This would make it easier to write things in functional style, using the same syntax as the object style.
It could be viewed as the natural complement for the `do` keyword, which adds a last block parameter to the end of the function. I'm less certain about giving up `impl Foo { ... }`, though - that is useful for logically grouping, documenting and accessing functions (as in `Foo::foo(...)`). But it seems we don't have to give it up, just make it optional? On Sat, Oct 19, 2013 at 3:47 PM, Matthieu Monrocq < matthieu.monr...@gmail.com> wrote: > I see no reason for the restriction of "self". Why not simply say that any > function can be called with "first_arg.func(...)" style ? >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev