On Mon, Oct 8, 2012 at 3:19 PM, Eddy Cizeron <[email protected]> wrote:
> Sorry I have not made myself clear enough. My point is absolulety not say
> that inheritance is a good/bad/required/unnecessary feature. My point is
> that if you're not using it (or at least if you're not using dynamic
> linkage), I cannot see where or why OOP concepts and syntax are relevant
> anymore. (But apparently there are some attempts to use dynamic linkage with
> interfaces and I didn't know that).

One minor non-semantic, non-scientific benefit of OOP syntax over
Algol-style function application syntax is that it's syntactically
more composable—compare `a.foo().bar().bas()`, which reads
left-to-right and composes to the right, to `bas(bar(foo(a)))`, which
reads inside-out and requires bracketing on both sides of an inner
experssion to compose calls. (Of course this only works if your APIs
are designed up front in a "fluent" way, and isn't quite as flexible
as what you can do with combinators in ML or Haskell.)

-Joe
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to