News for hackers. Stuff that matters.
Re:Don't distract new programmers with OOP by robee on Thursday March 17, 2011 @02:42AM (#2335300)
Object Oriented programming exists because it is how humans conceptualize the world around them. Humans think in objects and actions on, in and between objects. OOP is a translation of natural thinking into systems and behaviors. Why is this a bad thing, especially for learning?

I guess my question is, why does OOP and an natural translation between the real world and the code world lead to this discussion and a certain level of condescension around utilizing the concepts of OOP?

Re:Don't distract new programmers with OOP by zvrba on Thursday March 17, 2011 @04:52AM (#2335488)
The way humans conceptualize the world is miles away from how computers work. We (or at least I) conceptualize the world in terms of relationships between things we encounter, but the focus of OOP is designing individual classes and their hierarchies.

But note that, in everyday life, relationships exist mostly between objects that would have been instances of unrelated classes in OOP. For example, my SCREEN IS ON TOP of the TABLE; I (a human being) AM SITTING on a CHAIR; a CAR IS ON the ROAD; I am TYPING on THE KEYBOARD; the COFFEE MACHINE BOILS WATER.

We think in terms of bivalent (sometimes trivalent, as, for example in, "I gave you flowers") verbs where the verb is the action (relation) that operates on two objects to produce some result/action. Contrast that with OOP where you first have to find one object and tell it to perform some action on another object. The way of thinking is shifted from actions/verbs operating on nouns to nouns operating on nouns, which is highly unnatural for me. It is as if everything is being said in passive voice, e.g., "the keyboard is being typed on by me".

Re:Don't distract new programmers with OOP by weavejester on Thursday March 17, 2011 @11:59AM (#2336565)
I'm not sure that's true. In OOP, a methods belong to objects. In a natural language, a verbs don't really belong to nouns. To me, the structure of OOP is very different to how people typically think.
Re:Don't distract new programmers with OOP by nickik on Thursday March 17, 2011 @05:40AM (#2335570)
Why don't you use Erlang? Its much closer to you definition of OOP.
Re:Don't distract new programmers with OOP by Ingaz on Thursday March 17, 2011 @05:19PM (#2338157)
Exactly.

And I think that Erlang is most closest to Kay's definition of OOP. (If we can drop "Everything is object")

Erlang processes are objects.