It seems to me that maybe there are several concepts/changes that are
discussed at once, and it would be possible to nitpick.

Personally, when I think of unifying calls, I only think of having
"foo.bar(baz)" being strictly equivalent to "bar(foo, baz)"; nothing more
than a syntax trick in a way. And thus:

+ I do not see any reason not to keep a special "associated method"
look-up, though instead it would be tied to the first parameter of the
function rather than limited to method-like calls

+ I do not see any reason not to keep automatically exporting/importing all
methods whose first parameter is that of an exported/imported type or trait

+ I do not see any reason to move from explicit trait implementation to
structural and automatic trait implementation (and I would consider it
harmful)


Thus I am wondering:

- if I am missing something fundamental in the proposal by Gabor Lehel (I
am not completely accustomed with the Rust terminology/idioms)

- if such a simple "syntax sugar" could make its way into the language

-- Matthieu



On Sun, Oct 20, 2013 at 7:22 PM, Gábor Lehel <[email protected]> wrote:

> On Sun, Oct 20, 2013 at 4:56 PM, Patrick Walton <[email protected]>wrote:
>
>> I don't see the things you mention as warts. They're just consequences
>> of, well, having methods in the OO sense. Nearly all of these "warts" show
>> up in other object-oriented languages too. Maybe they're warts of
>> object-oriented programming in general and illustrate that OO is a bad
>> idea, but as I mentioned before Rust is designed to support OO.
>>
>
> OO for me was always more tied in with virtual methods than with how
> methods are scoped. But either way - I think this is basically my view. :)
> The only part of it I like is dot syntax.
>
> --
> Your ship was destroyed in a monadic eruption.
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to