DEV Community

Discussion on: Is Object-Oriented Programming "Dangerous"?

 
combinatorylogic profile image
combinatorylogic

I would never think that hierarchies have methods.

What are you talking about?

My point is that trying to even get a proper hierarchy, even in the one and only problem domain where a real-world inheritance exist, is still a fools errand and it always ends up in a massive mess. I referred to the prokaryota taxonomy for a reason - it suffered revision after revision and is still very far from being anything adequate. Genetic mapping proved that all the previous hierarchies built upon visible phenotypical differences are wrong.

As for "methods" - the OOP way of modeling the reality is to think of it as objects communicating with messages. And it's wrong, through and through. Only a tiny proportion of mostly irrelevant problem domains fit well into such a model.

Take any real world problem and try to represent it in form of hierarchical taxonomies of communicating objects. Than compare the monstrosity you created with a natural language of that problem domain. You won't see any similarity whatsoever. Real world does not speak in objects, real humans do not think in objects.

All of the OOP methodology is 100% synthetic and does not reflect real world in any way. Even, as I demonstrated above, in the one and only problem domain where an actual real world inheritance is present.

Thread Thread
 
oenonono profile image
Junk

What in the heck are you talking about? Natural languages are full of objects!

Those two sentences contain at least two. "You" and "languages."

People organize into hierarchies. Whole nations and thousands of companies are organized in hierarchies.

All of these things exist in the real world and are problem domains.

Taxonomies are rarely useful? Then why are there so many?

Thread Thread
 
combinatorylogic profile image
combinatorylogic

Only if you stretch a definition of an object far beyond any scope OOP ever dared to reach. Only if you allow multiple parallel non-rigid, evolving hierarchies. Which again destroys anything OOP could work with.

The notion of objects is useless and does not help in any way to build models for any of the real world problem domains.

Thread Thread
 
yucer profile image
yucer • Edited

Man. Stop guessing and read the references I gave you.

The current understanding of the world origins is that everything comes from a singularity and a set of natural rules.

Every stuff of the universe that you can recognize comes from one of less complexity or the composition of entities of lower complexity that were formed the same way.

The fact that humans have not been able to classify something only means that there there is a lack of information about that specific entity.

Of course that one object belong to many hierarchies. And that is because of the composition, otherwise all the the entities of the universe would belong to one big hierarchy of inheritance.

Humans classify everything into a hierarchy of knowledge. Have you ever opened a dictionary? Everything is defined referring a concept of lower complexity and the distinctive qualities of the new concept.

A well known exercise is to open Wikipedia and make click in the first definition refered in each page and count how many pages are until you reach the top of the hierarchy.

You are denying a whole branch of computing that is called "semantic computing".

There is a lot to learn, the world wasn't born today and most of the theory that is used in informatics comes from hundreds of years ago.

Thread Thread
 
combinatorylogic profile image
combinatorylogic

A word of advise - in the future, avoid exposing your superficial and totally misguided delusion of how the world works when you're trying to argue with a physicist.

Let me point you to a far more important source than any of the incoherent ramblings you've cited here - the fundamental Algorithmic Information Theory. You could have heard of it in a context of Kolmogorov complexity. Once you learn it you'll see how horribly wrong yout assumption about a simple initial state + a set of rules is, and that no complexity in this universe would have been possible without a constant input of a true white noise.

And that's just one little thing where you're totally wrong. Don't even let me start on hierarchies and objects again, you clearly do not know what you're talking about.

Thread Thread
 
yucer profile image
yucer

A word of advise - in the future, avoid exposing your superficial and totally misguided delusion of how the world works when you're trying to argue with a physicist.

I must recognize that I am not an expert in any of the fields that we are dealing here. I am just an engineer, and that means trust in the knowledge and tools developed so far by the academy and build solutions with it.

I have just reacted this way -and I apologize for it- because the author of the article -unknown for me- is attacking a whole set of academy, industry method and tools without a basis understanding of most of the stuffs it criticizes. And doing so it is questioning also the way humans acquire, organize and use the information.

In practical terms, the discussion of how the world works in physical terms doesn't fit here in its full extension. It does just in the part concerned to the information that it contains and just to the part related to the problem domains that we deal with.

I have strong feeling that our brain has been optimized by the "evolution" or any equivalent mechanism to recognize and classify the information corresponding to what the world contains. With programming paradigms we are just trying to find abstraction tools to communicate that knowledge to the computer.

One programming paradigm fit better than other for that task, but there would be breaking-change if you change, for example, the basis concepts that make the computer you are trying to program. For example, would all those programming paradigms work the same in quantum computing ? Or a computer that works like the brain? I guess no.

So pretending that the reality works like a programming paradigm is a wrong way of thinking. The paradigms use to view the reality restricted to a particular scope, by the way they are made to be broken not to be taken as the ultimate and immovable reality. That would be creating a dogma.

Kolmogorov complexity and the branch of Algorithmic information theory deal with the the generation of objects by mean of computation. Do you really believe that our reality is being generated by one information system ? Maybe with Javascript ? ;-)

You might think that stochastic processes could be also involved in the creation of objects of bigger complexity. Sorry, I have used statistics, but I don't believe in processes of random nature. Calculating the probabilities for a dice throw is just a way to deal with the complexity behind all the mechanics.

By the way... can you give me a reference for this?

no complexity in this universe would have been possible without a constant input of a true white noise.

That's a good argument for more than one of the world religions. it is very interesting.

Being a physicist, you'll like the idea of a Theory of Everything. Just a formula to explain the basic mechanics of all the universe. But your mind would not be enough to derive from that formula and how one action moves in the market.

Do you see it better like a big real world state, immutable in the plank unit of time that is passed as parameter to one function and gives the state for the next time unit ?

I must recognize that Quantum nonlocality would favour that. But now that we have better Standard model, including elementary particles for the forces... that means that the objects have also the basic units of behaviour on bounded to its matter (shared-state) right ?

Well.. In practical terms, at some levels it is actually irrelevant if the world is discrete or continuous, even whether it is driven by big formula or some more discrete rules. There is one organization of Complex Systems in the stock market, there another one in the biological systems, there is one in social systems, etc... human did start to learn from top-down not from button-up, from practical levels. The context is: Systems Theory.

The organization of complexity has common patterns, and the basics of those patterns were studied by science, and somewhere at the beginning of this sequence some of them where taken for OOP. OOP didn't fall from the sky, and I am sure that FP neither.

Regarding to the hierarchies... ask why Amazon and other online shops use them as facets and mix them in the faceted search. It is because they are everywhere... and objects are trapped into many of them.

I did never say that all the objects belong to just one hierarchy. Humans use hierarchies also in faceted classification in all schemes of knowledge organization. The assertion that real worlds has no hierarchies is simply wrong.

Thread Thread
 
combinatorylogic profile image
combinatorylogic

is attacking a whole set of academy

Academia is not behind any of the OOP. Academic computer science never really been interested in OOP, and by now it's long in the past.

I have strong feeling that our brain has been optimized by the "evolution" or any equivalent mechanism to recognize and classify the information corresponding to what the world contains.

Just keep in mind that this classification have absolutely, totally, 100% nothing to do with any of the synthetic OOP classifications.

We do not classify things into rigid hierarchical taxonomies. As soon as you come up with a programming paradigm that operates in complex graph classifications our minds deal with, it'll become relevant to our discussion, but OOP is nowhere close to such a hypothetical model.

Do you really believe that our reality is being generated by one information system ?

Reality is an information system, by definition.

And, since it's heavily based on truly stochastic processes, we cannot say it's "generated" (as in computed from some initial state with a fixed set of rules).

By the way... can you give me a reference for this?

Pretty much any textbook on the Algorithmic Information Theory.

The very definition of the amount of information in a system is this exactly: a size of the smallest possible algorithm that reconstructs the entire system. If we could compute any future state with a 100% accuracy using only the initial state (which is, as you pointed out, just a singularity) and a set of rules (the fundamental laws), the amount of information in the whole of the Universe would have been no more than the few pages you'd need to write down the fundamental laws. Which is not what we observe.

The moment you add a true randomness to a system - you have an infinite source of information, because white noise is uncompressable, it contains exactly as much information in it as a number of data points you sampled.

A system fed with an infinite source of information can evolve, can generate new complexity. That's why the interpretation of quantum mechanics that relies on true randomness is so important - it explains why the Universe is evolving.

You can think of it as two kinds of processes:

One is fully deterministic:

NexState = F(PreviousState)

where F is a pure function (in mathematical sense), and this function is exactly the minimal algorithm, the whole information your system contains (along with the state_0 it all started with.

A stochastic process is more interesting:

NextState = F(PreviousState, Noise)

And the amount of information in the next state will be state_0 + F added to a size of the true Noise consumed by this system. Amount of information (and, therefore, a complexity) if this system can grow indefinitely.

Do you see it better like a big real world state, immutable in the plank unit of time that is passed as parameter to one function and gives the state for the next time unit ?

See the second case above - it's a function that consumes the previous state and a huge amount of true random noise to produce the next state. Without this noise we'd never have any observable complexity in the Universe.

ask why Amazon and other online shops use them as facets and mix them in the faceted search.

Did you notice that these hierarchies are not rigid in any way?

And OOP cannot handle non-rigid, complex hierarchies.

The assertion that real worlds has no hierarchies is simply wrong.

Real world does not have this kind of hierarchies that OOP is built upon.

Thread Thread
 
oenonono profile image
Junk • Edited

My argument is that the kind of hierarchies OOP is built on are whichever kind of hierarchies people writing the code choose to organize objects into. We're not actually talking about the nature of Reality-with-a-captital-R. We're talking about the way everyday people understand reality. And about how a person might tell a computer to do certain things. That is all this is. Academics and theory are fascinating, necessary things. But I'm not a computer scientist or a physicist and I don't need my code to prove the big bang or whatever. I write code for a living and for that I need to stay in touch with the practical purpose of the code I'm writing. Lamba calculus is not practical for me. Expressiveness with plain words that make clearly readable sentences most people can understand is practical. Is there overly obtuse, counterintuitive, impractical OOP? Yes. Let a million people loose on anything for a few decades and see how much noise is in the signal. But which is a simpler word more people have an existing intuitive grasp of? Inheritance or currying? That's the fundamental appeal of OOP for me and the thing I want to see out of any paradigm before I go calling it The One True Way. Which I don't do anyway because there's not one: my hope is to adopt the best both have to offer and avoid the worst. I have a theory that that very benefit is part of the problem with OOP, though. As a new programmer it can make you feel like you really get it before you have the experience you need and you go wild, drunk on unnecessary complexity.

Thread Thread
 
yucer profile image
yucer • Edited

That's a good point. In most of the problem domains we use computers to help us with the stuff that our minds can not do at higher levels: accurately calculate with speed and storage a big amount of data.

In such cases they become a part of our information system, an extension of our brains. In such domains we trend to analyze them according to the semantic structure more than the functional behavior. Like commerce, storage, publishing...

But there might be domains where the accuracy of the interaction with physical objects should be a priority. Like automation and communication.