News for hackers. Stuff that matters.
Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @01:08PM (#30061445)
Object-oriented concepts are everywhere, even in software products like the Linux kernel, that don't use an object-oriented language. I'd go so far as to argue that 99.999% of all software is object-oriented (and I'm probably missing a few nines).

But you're just saying that's merely popular and not successful? That seems extremely flippant.

Re:Goodbye, Object Oriented Programming by deltaonefour on Monday January 24, 2022 @01:18PM (#30061592)
Null is more popular than OOP. It's also something all programmers can agree is a huge mistake. But this concept is replicated literally everywhere.

See: https://www.reddit.com/r/AskComputerScience/comments/bhgtzp/...

People in general are stupid. They get onto hype trains they develop biases and they vote for Trump and try to invade the Whitehouse.

Programmers are people. Hence why stupid concepts can propagate throughout the community.

(Not saying OOP is stupid, just saying that something being popular doesn't negate it from being placed in the stupid bucket.)

Re:Goodbye, Object Oriented Programming by invalidname on Monday January 24, 2022 @10:05PM (#30067391)
No. Null is great and has no good alternative.

The attack on null stems from:

* Bad implementations of null handling

* Functional programming which doesn't handle null well

Null itself is efficient. It has hardware/OS support and is literally zero overhead. It fails fast so you don't see nonsense like "undefined" columns or bad data in your database.

When null fails in a good language you usually get a stack directly to your problem. You have one concept to follow through the code instead of multiple concepts.

I'm not here to convince you. I'm a fan of OOP and you obviously won't agree with me on either. But claiming "all" or even most without data to back it means you live in a bubble.

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @12:08AM (#30068324)
> No. Null is great and has no good alternative.

First off you don't know what you're talking about. The inventor of the concept of Null has this to say about Null:

"I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years."

The attack on null stems from Tony Hoare the inventor hating on null. It also stems from programmers who know what they're talking about.

>Null itself is efficient. It has hardware/OS support and is literally zero overhead.

On x86-64, the general registers are simply bits that are mostly interpreted as integer values. They do not have additional states such as “null” in the sense of “not currently holding a value”. (Some architectures do have such additional states, and the floating-point registers in IA-32 can have such a state.) Unless the OS exposes it's own custom ISA (which they don't) then this is NOT an OS concept either.

>When null fails in a good language you usually get a stack directly to your problem. You have one concept to follow through the code instead of multiple concepts.

The argument against null stems from the fact that the failure wouldn't even exist in the first place if null didn't exist period. The language itself should statically handle undefined concepts via types. By moving all runtime errors to compile time errors you eliminate the need of even looking at the stack. Possibly the most extreme example of this is elm. It is not possible for the elm language to have ANY runtime errors. All errors that are otherwise runtime errors in C or C++ are caught as compiler errors in elm.

>I'm not here to convince you. I'm a fan of OOP and you obviously won't agree with me on either.

I'm not a fan of OOP or FP. I'm an unbiased observer. The argument your making here is not either OOP or FP. It's part of mathematics. Type theory. I have a type called int. Why do I have this entity called Null within the type that fails even though everything type checks? It's a violation of the type contract. Your argument is saying the violation is ok for practical purposes. I'm saying it's not.

> But claiming "all" or even most without data to back it means you live in a bubble.

All programmers know how to sort a list. Do I need data to back up that statement? Perhaps I'm wrong. There are programmers out there who don't know how to do this. I thought null being bad was as obvious as sorting a list. Guess there's one person out there who doesn't know it's bad. It's unreasonable for me to get "data" on a If you want data, the quote from the inventor of null is the best possible one.

Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @03:30PM (#30063580)
> People in general are stupid.

Many people in the singular are brilliant. You are hand-waving away the fact that the most highly experienced and skilled developers in the world, have in the majority, chosen to develop their software using object-oriented programming. And that software is what we use the most every day.

Re:Goodbye, Object Oriented Programming by deltaonefour on Monday January 24, 2022 @04:15PM (#30064156)
Tons of smart people vote for trump (Peter Thiel for example). I mean you get what I'm saying. Just because some smart people use it doesn't mean it's right. Just because something is popular doesn't mean it's a success.
Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @05:25PM (#30064896)
What will take for you to see that earth is round?

Popular is bad.

Smart people use it, it's bad.

Billions of successful products making trillions of dollars, bad.

You've come to a conclusion and no amount of absolutely overwhelming evidence can convince you otherwise.

Re:Goodbye, Object Oriented Programming by deltaonefour on Monday January 24, 2022 @09:31PM (#30067150)
The entire world produces green house gases which will ultimately end the human race doesn't mean it's good even though overwhelming people use it.

>You've come to a conclusion and no amount of absolutely overwhelming evidence can convince you otherwise.

I didn't come to a conclusion. All I am saying is YOUR conclusion has no basis. Popularity is not evidence for success.

Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @10:52PM (#30067745)
What is evidence for success then?
Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @12:47AM (#30068581)
A mathematical proof that OOP programs are more modular and less complex then procedural or functional programs.

We are in the realm of logic and idealized language primitives. Thus things can be proven via logic. Science, statistics and other data driven methods are weaker wherever something can be proven via logic. So while popularity doesn't even serve to slightly support the hypothesis of success, even if it did, a logical proof is superior and makes the conclusion definitive.

If such a thing is discovered it is definitive. It will destroy all arguments against OOP.

Until then the next best thing is examples. Given an OOP program, give the FP or imperative equivalent. Prove the OOP program is definitively better for the one single case.

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @01:53AM (#30068939)
Completely misses the human element though. I spend a significant amount of effort in programming ensuring that the code is readable to humans. Why? Because humans are the most important part -- they're both the creators and the reason why we do it.

You can create the most mathematically perfect paradigm/language but if it's brutal nobody will use it. Is that success? I don't think so.

The biggest issue in software development is the sheer size of it all. How do we build software that literally requires dozens, hundreds, maybe thousands of developers all working on the same thing?

I have evidence in the success of OOP in solving that problem in the form of all the software that exists and works. The proof is literally out there, everywhere. Your measure of success isn't even theoretical, it's an unproven (maybe unprovable) hypothesis. My measure of success is the practical. You can completely disregard that as "popularity" but to what end?

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @11:55AM (#30074211)
>Completely misses the human element though

That's the point. The entire programming world moves in circles reinventing the wheel and repeating the same mistakes every decade or so. Humans are biased. We need definitive answers.

>You can create the most mathematically perfect paradigm/language but if it's brutal nobody will use it. Is that success? I don't think so.

No I never said this. All I said was PROVE OOP is BETTER than other paradigms in terms of modularity and complexity. I never said design a perfect mathematical language from scratch. In fact, in mathematics, the concept of perfect doesn't exist. A language is just a language, it's not better or more perfect than any other language.

>The biggest issue in software development is the sheer size of it all. How do we build software that literally requires dozens, hundreds, maybe thousands of developers all working on the same thing?

I don't know where you're going with this. The argument is whether OOP is a good paradigm and an easy way to prove this is to either mathematically prove it's better than all other paradigms or give examples on how it's better. Give me singular examples where OOP is superior and that lends credence to your argument. How does saying that software development is "huge" with "thousands of developers" working on it mean anything at all? It doesn't. It strays from the main point.

>I have evidence in the success of OOP in solving that problem in the form of all the software that exists and works

OOP and FP are both turing complete. That means Every OOP program has an FP and imperative counterpart. In addition to this many Non-OOP software solutions exist in the real world. Linux for example is NOT OOP.

Thus for both OOP and FP and imperative. Mathematical Proof EXISTS that it works. Statistical evidence through existing software also adds to that proof. The argument is WHICH is better? That's all we disagree on right now. Which Paradigm is superior and in what area?

> You can completely disregard that as "popularity" but to what end?

I can completely disregard it because in many areas it has been shown to be completely unreliable, illogical and contradictory. This is statistically valid. For example religion. Thousands of religions are popular in this world. All of them are declared as the absolute truth, all of them are contradictory.

Why are you continuously using a metric that has ACTUALLY been disproved to be reliable as your bar? The popularity of OOP ONLY shows that it works. It does not show that it is BETTER.

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @12:36PM (#30074898)
You keep moving the goal posts. I never said better, I said most successful. If you want to say better, then you need to say better "for what".

> OOP and FP are both turing complete. That means Every OOP program has an FP and imperative counterpart. In addition to this many Non-OOP software solutions exist in the real world. Linux for example is NOT OOP.

Right so there could be non-OOP counterparts to the overabundance of OOP applications but they don't exist. You argue that everyone in the world is an idiot and you're the one sane person -- think about that.

Linux has plenty of OOP design patterns.

https://lwn.net/Articles/444910/

https://lwn.net/Articles/446317/

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @01:14PM (#30075593)
>You keep moving the goal posts. I never said better, I said most successful.

If something was the "most successful" then by definition it would be "better" then everything else including FP and imperative. No goal post was moved.

>Right so there could be non-OOP counterparts to the overabundance of OOP applications but they don't exist.

They do. Linux was one example. Whatsapp is another example. They exist. I'm not sure why your dismissing them. Sure the majority is OOP but again that doesn't mean anything.

>You argue that everyone in the world is an idiot and you're the one sane person -- think about that.

I never said that. Think about that. I said popularity is not proof it's better. I never said they were idiots, and I never said they are wrong. I am simply saying something being popular doesn't mean it's successful. It doesn't determine anything. A popular thing could be successful it could not be successful and popularity is a bad foundation for arguments.

Additionally you just need to look at the world and contradictory religious practices leading to jihads, crusades and suicide bombings to question the veracity of "popularity."

>Linux has plenty of OOP design patterns.

Sure isomorphism to patterns exist in FP to OOP to imperative. You'll find connections and similarities between patterns of EVERY paradigm. Doesn't change the overall fact that Linux overall is NOT OOP.

You think just because map and reduce exist as methods in java makes it a functional language? No. The overall point of the language and design decision is what matters here. Linux is NOT OOP.

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @02:10PM (#30076494)
> They exist. I'm not sure why your dismissing them. Sure the majority is OOP but again that doesn't mean anything.

Of course they exist. And they are the exception. That's entirely the point.

> Sure the majority is OOP but again that doesn't mean anything.

Of course it does. Developers choose OOP and over and over again even after decades of failed attempts to unseat with supposedly better technologies.

To deny that is to claim the earth is flat.

> You think just because map and reduce exist as methods in java makes it a functional language?

No, but it certainly demonstrates the success of functional concepts even in an OOP language.

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @03:24PM (#30077545)
I've proved to you with examples over and over again that majority and popularity aren't good metrics.

A huge portion of the world is muslim, a huge portion of the world is christian and another huge portion of the world is Buddhist and another portion of the world is atheist.

Only one of them can be right. Therefore the MAJORITY is WRONG.

The example above is already definitive proof that POPULARITY and MAJORITY cannot be used as an accurate metric given most of the worlds beliefs are completely OFF BASE.

Yet here you are endlessly parading majority and popularity as the best metric and stating that if I claim otherwise I'm believing the world is flat. Try to be logical.

If your goal is to convince me (which I assume is the case given that you ARE responding to me) then you need to stop using popularity as a metric. By giving one instance where popularity is inaccurate I have ALREADY shown that it is not a valid metric and useless in your endeavor to convince me.

If your goal isn't to convince me then I question the rationality behind why you're even communicating with me? Is it possible that you're just defending your own beliefs?

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @03:48PM (#30077817)
One religion, right or wrong, could be more successful based on whatever metric is used for success.

In my case, success for a programming paradigm is a large number of successful projects that use it. Note, this says nothing about opinions. It's a measure of facts. The fact is that there are more successful OOP projects than any other by a inescapably huge margin.

You can argue that everyone is misguided and the whole thing is wrong but that's something else entirely. It doesn't change the fact of that success. If Buddhism being wrong, whatever that might mean, wouldn't change the fact of it's success based on how that is defined. God forbid that the measure of success is enlightenment -- your head might explode.

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @05:27PM (#30079004)
>One religion, right or wrong, could be more successful based on whatever metric is used for success.

The metric that I was referring to is truth. Only one can be true, or None. Either way the majority of religions are False no matter the outcome.

>In my case, success for a programming paradigm is a large number of successful projects that use it.

Oh yeah define the success case to be exactly the evidence. Clearly we're talking about something more nuanced here. If for example all possibly projects were executed in FP or OOP which version would be more modular, save time and be less complicated... I mean this is obvious. You're taking things in stupid direction.

>If Buddhism being wrong, whatever that might mean, wouldn't change the fact of it's success based on how that is defined. God forbid that the measure of success is enlightenment -- your head might explode.

Please stay on topic.

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @05:43PM (#30079178)
> If for example all possibly projects were executed in FP or OOP which version would be more modular, save time and be less complicated...

The problem is you want to ignore facts -- the unbelievable success of OOP -- so you can concentrate on the theoretical. There's nothing stupid about pointing out that OOP is basically the most successful programming paradigm in history. Most of these paradigms were invented all the around the same time and yet one as overwhelmingly won the hearts and minds of the majority of developers. You still are saying nothing.

As for off topic, when your argument consists of comparisons to religion, Trump voters, etc that's about a lazy as you can get.

Re:Goodbye, Object Oriented Programming by deltaonefour on Tuesday January 25, 2022 @08:59PM (#30080711)
No facts were ignored. I addressed your facts with reasons why your evidence cannot be used to support your conclusion.

To prove your point you must disprove my reasoning. But all your doing is reiterating your point. Yes I know you think popularity is valid, but I already told you why I think it's invalid. To convince me you have to attack my reasoning. Look I'm teaching you how to debate.

>As for off topic, when your argument consists of comparisons to religion, Trump voters, etc that's about a lazy as you can get.

Those are called examples to help illustrate my point. They are not off topic. Your little Segway into enlightenment and Buddhism is completely off topic.

Re:Goodbye, Object Oriented Programming by wvenable on Tuesday January 25, 2022 @10:49PM (#30081446)
You're making a very basic mistake of logic.

Success (in this instance) requires Popularity but Popularity does not imply Success.

You keep attacking popularity but that doesn't affect success at all. Do you take umbrage with the idea that many working and wonderful products is success?

You are making up an alternative definition of success, which is untestable, and then claiming OOP is not successful based on that. But you haven't disproved that my idea of success is invalid. You keep attacking popularity.

Re:Goodbye, Object Oriented Programming by deltaonefour on Wednesday January 26, 2022 @03:31AM (#30083136)
>You're making a very basic mistake of logic. >Success (in this instance) requires Popularity but Popularity does not imply Success.

How is your statement logical? Who says success requires popularity? In what universe does that make sense?

A heart transplant was successfully completed recently. The man survived with no immune rejections. The heart came from a genetically modified pig spliced with genes to prevent rejection and stop growth after transplantation.

First time it occurred. It is a "successful" transplantation and BY DEFINITION since it only happened on one person in the whole of human history... NOT POPULAR. So if this "successful" event happened in the reality we live in... it means that things can be successful and NOT POPULAR at the same time.

"Not Logical"... Come on man.

>You are making up an alternative definition of success, which is untestable,

No I'm using the definition of successful in terms of the English language. Look it up in the dictionary to see if it contains the word "popular."

>But you haven't disproved that my idea of success is invalid. You keep attacking popularity.

My point isn't too prove anything. All I am saying and I repeat for like the hundredth time that you're statements have no logical basis. That's it. You claim is INVALID.

Here's an example that you can probably understand. If you enter a password into a system... I tell you the password is INVALID. I said nothing else. I didn't say no password exists, I didn't say a password does exist. I said NOTHING other than your password (aka claim) is INVALID.

Re:Goodbye, Object Oriented Programming by wvenable on Wednesday January 26, 2022 @11:13AM (#30087292)
> Who says success requires popularity? In what universe does that make sense?

For a programming paradigm, it's required. A programming paradigm that is not used by many programmers is not successful paradigm. It's a failure or it hasn't succeeded yet.

Re:Goodbye, Object Oriented Programming by deltaonefour on Wednesday January 26, 2022 @03:42PM (#30091477)
>For a programming paradigm, it's required. A programming paradigm that is not used by many programmers is not successful paradigm. It's a failure or it hasn't succeeded yet.

No it's not that's just a made up assumption by you. Nix and BSD are currently not popular. Even linux at one point was not popular. There are thousands and thousands of examples in software where the technology isn't popular but very successful on every other metric. There are opposite examples where the technology is popular but pretty unsuccessful in every other metric.

Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @01:25PM (#30061697)
I'm not saying OOP is popular, I'm saying it's successful.

You're not making an argument against that at all. You're saying it's popular (not what I'm saying) and bad things can be popular. So what! Good things can also be popular. In fact, good things are often popular.

Re:Goodbye, Object Oriented Programming by deltaonefour on Monday January 24, 2022 @04:19PM (#30064206)
>I'm not saying OOP is popular, I'm saying it's successful.You're not making an argument against that at all.

No. No. I am NOT making an argument saying is OOP is NOT Successful. I never Made such an argument EVER.

What I am saying is that your argument is completely Invalid. I am saying you can make no such argument for OOP being successful. Big difference. I make no argument on anything other than saying your argument CANNOT be made with your given evidence.

The evidence you present only supports OOP's popularity. Not it's success. Unless you count popularity as success. The argument can still be made that for every application of OOP on ANY project a better non-OOP solution could have been made. This is a possibility. My post only opens this as a possibility and dismisses your post as the absolute truth.

Re:Goodbye, Object Oriented Programming by wvenable on Monday January 24, 2022 @05:33PM (#30064999)
The flaw in your argument is that those non-OOP solutions were not made. They don't exist. The idea that some other programming paradigm is more successful based on products that don't exist is ridiculous.
Re:Goodbye, Object Oriented Programming by deltaonefour on Monday January 24, 2022 @09:33PM (#30067159)
Linux is not OOP. The react and redux pattern eschews OOP. (You can use OOP components but the overarching pattern is functional)

Many solutions are made without OOP.

Re:Goodbye, Object Oriented Programming by readthenotes1 on Monday January 24, 2022 @01:59PM (#30062230)
Like tobacco, sugar, whisky, and caffeine, brussel sprouts, cod liver oil, ...