News for hackers. Stuff that matters.
Re:Announcing Rust 1.20 by tree_of_item on Thursday August 31, 2017 @03:06PM (#15142887)
> Encapsulation, Polymorphism, And Code Reuse.

These are three incredibly vague terms that pretty much every programming language can be said to provide. I can't understand how you think OOP is defined by this.

Do you think Haskell programmers are unable to reuse code? That they don't have any form of polymorphism? That they can't hide implementation details of functions, data structures and modules?

This is the kind of argument that convinces me that OOP is completely bunk. Its adherents can't even explain what it is!

Re:Announcing Rust 1.20 by protomikron on Thursday August 31, 2017 @06:13PM (#15144409)
> These are three incredibly vague terms that pretty much every programming language can be said to provide. I can't understand how you think OOP is defined by this.

I do not want to defend OOP, but I would like to add that object-orientated languages are often to be expected to support these 3 things (encapsulation, inheritance and polymorphism) - at least many sources list these properties as must-have to be considered object-orientated.

> This is the kind of argument that convinces me that OOP is completely bunk.

Agreed. E.g. functional programming has a sound foundation (λ-calculus), but in object-oriented land if often sounds a little bit hand-wavy.

Re:Announcing Rust 1.20 by zaphar on Thursday August 31, 2017 @03:12PM (#15142942)
I wouldn't call myself an adherent. If anything I'm an adherent to the idea that Objects are just another Closure and vice versa. The interesting distinctions are in how they achieve those same goals.

But most working programmers don't care about the debate at all in my experience. When they say they are looking for an object oriented language what they are really saying is:

    I am looking for a language that has a syntax where you
    can declare an object and call methods on that object 
    usually with a dot but sometimes with an ->.
They don't actually care about much more than that most of the time.
Re:Announcing Rust 1.20 by tree_of_item on Thursday August 31, 2017 @03:17PM (#15143014)
> I'm looking for a language with "objects" and a syntax like <this>

But why? That's such a weird thing to look for. Clearly there's a reason they think they want "objects", but what is it? And why the focus on what syntax these objects have?

Re:Announcing Rust 1.20 by zaphar on Thursday August 31, 2017 @05:15PM (#15143997)
I'm not arguing this is a good thing. But I am saying that for the vast majority of programmers out there they use that pattern as a way of determining if they have those three attributes. It's cargo cult programming in a sense but it's also the only signal they've ever known.
Re:Announcing Rust 1.20 by leshow on Thursday August 31, 2017 @05:45PM (#15144232)
I think calling Rust that would confuse people more than anything. They will look for their traditional inheritance style relationships and be frustrated that there is not really any support for it. Better to teach the features that Rust actually has, than to try and fit some uber generic definition of "Objects" that's not going to serve newcommers.
Re:Announcing Rust 1.20 by imtringued on Friday September 01, 2017 @05:20AM (#15147129)
Code organisation. Classes are basically used as datatype specific namespaces.

In Haskell you have to deal with the possibility of record types sharing the same field names.