News for hackers. Stuff that matters.
Re:Announcing Rust 1.20 by sanxiyn on Friday September 01, 2017 @04:12AM (#15146932)
I actually think having syntactic methods is an important (if not the most important) part of "OOP". You compared x.foo() with foo(x), but that's the wrong comparison. The correct comparison is that when x if of type Tree, x.foo() vs tree_foo(x). Otherwise you get name clashes.

That is, I think the essence of "OOP", OOP-as-used, not any theoretical OOP, is function name resolution depending on type. That and syntax. So first, you write x.tree_foo() instead of tree_foo(x) which is purely syntactic. And then you shorten x.tree_foo() to x.foo(), because x is a tree, which is a great semantic help.

According to this definition, Haskell and C are not "OOP", which matches common understanding.

Re:Announcing Rust 1.20 by pdpi on Friday September 01, 2017 @02:58PM (#15151466)
Function name resolution isn't OOP, it's attaching a namespace to a type. The _really_ important part is dynamic dispatch. You can have proper OOP without method syntax, it just looks awkward to our eyes. In fact, in Objective C,

    [obj doStuff: foo withBar: bar]
gets desugared into

    objc_msgSend(obj, NSSelectorFromString(@“doStuff:withBar:”), foo, bar)
Re:Announcing Rust 1.20 by sanxiyn on Saturday September 02, 2017 @01:29AM (#15154470)
I already agreed function name resolution isn't OOP. My argument was that it is "OOP", with quotes. My supporting evidence is that people consider C++ without any dynamic dispatch as "OOP", with quotes.
Re:Announcing Rust 1.20 by dbaupp on Friday September 01, 2017 @10:20AM (#15148502)
That's a great point and one I hadn't considered, thanks!