Live data from Hacker News

Is the supremacy of object oriented programming coming to a close?

blog.objectmentor.com

1–10 of 26 posts

Re: Is the supremacy of object oriented programming coming to a close?

#2
I don't think OOP is at an end. In fact, I think newer functional languages are giving it new life (and giving us alternative ways to use OOP). Consider clojure. It's fully object-oriented, but not in the traditional way (although you can still use Java objects).

Re: Is the supremacy of object oriented programming coming to a close?

#4
post #3

FP plus lighter and more dynamic objects doesn't sound like the end of OOP supremacy, but rather another stage of it. I'm curious to see where it leads / what comes out of it.

Also curious. Horizontal scaling, distribution, concurrency; that's where I see the tech heading. I think whatever will make those easier to deal with will have a huge advantage going forward.

Re: Is the supremacy of object oriented programming coming to a close?

#5
The answer to this question depends on how you define OOP and FP. I think the answer is "sort of".

The problem with OOP is that it encourages the proliferation of mutable state. If each object has mutable state, then a large object-oriented program has distributed mutable state, potentially in hundreds of different silos. Problems like concurrency become impossible to reason about.

FP encourages the careful sequestration of mutable state. It's false to say that FP outlaws it entirely, since it's hard to do anything useful without side effects. However, functional style limits and sequesters mutable state to such a degree that it's usually easy to reason about what side effects are happening.

Re: Is the supremacy of object oriented programming coming to a close?

#6
I largely agree with the author, but I think the reason for the "failure" of the object oriented model has more to do with the promises it made. Object Oriented Programing was supposed to make programming more understandable to the average human brain. In this respect, it's largely failed.

If functional programming is thriving, I feel that it's only because FP has been more honest with its goals, and has done a better job achieving them. FP is supposed to be mathematical in nature. It's uncomfortable to learn, but once you do, FP languages, for the most part, live up to their billing.

What is really needed is a new paradigm that is what OOP was supposed to be: programming that matches the patterns of human thought. In this respect, I think the author's suggestion of OOP-style modularization with FP-style pattern matching and function mapping is the future of programming.

Re: Is the supremacy of object oriented programming coming to a close?

#7

The answer to this question depends on how you define OOP and FP. I think the answer is "sort of". The problem with OOP is that it encourages the proliferation of mutable state. If each object has mutable state, then a large object-oriented program has distributed mutable state, potentially in hundreds of different silos. Problems like concurrency become impossible to reason about. FP encourages the careful sequestra…

Yes. And FP may even go so far, and uphold this segregation at the language level. I.e. Haskell's type system and IO Monad.

Re: Is the supremacy of object oriented programming coming to a close?

#8
"The ceremony of object wrappers doesn’t carry its weight."

This nails it. I find so much of my programming now is shoving data into objects, only to almost immediately pull it out again into JSON, XML, HTML templates, or relational databases (in both directions). Most of the code in these "objects" are just getters, setters and member declarations, with very little in the way of actual logic. There is little point in having objects at all for this kind of programming, as opposed to a map, struct, or type class of some sort.

Re: Is the supremacy of object oriented programming coming to a close?

#9
The worst thing in the world is working with code written by an inexperienced programmer who thinks he has to use OO everywhere for everything.

Same goes for table normalization.

One of the greatest things about experience is that you know when you should use the "proper" way of doing things and when you should make things work faster/better/more directly.

Re: Is the supremacy of object oriented programming coming to a close?

#10
post #6

I largely agree with the author, but I think the reason for the "failure" of the object oriented model has more to do with the promises it made. Object Oriented Programing was supposed to make programming more understandable to the average human brain. In this respect, it's largely failed. If functional programming is thriving, I feel that it's only because FP has been more honest with its goals, and has done a bette…

So Scala?
Post reply on HN