News for hackers. Stuff that matters.
Re:OOP Is Dead, Long Live OOP by mehrdadn on Thursday October 18, 2018 @02:10PM (#18250649)
> OOP is just a mental model. Deep down everything is made of bits. The church of OOP has failed but if something looks like a duck, walks like a duck and talks like a duck it probably is useful to make a duck class. We're now down to fighting for nuances.

No... I think this is missing precisely what was exactly the point of the article (see "(B)" in the text). This post is not a fight over OOP religion. The point of it is if you misunderstand or mischaracterize "nuances" about some idea (if these are actually all nuances, which I think is debatable) and propagate them, then you shield other people from prior (edit: or even current) literature in the area, and hence prevent them from understanding what the relevant techniques really are and how to use them properly at all. This makes them lose a potentially powerful tool in their toolset, which you should agree is an awful thing regardless of what coding 'religion' you follow.

Re:OOP Is Dead, Long Live OOP by trgn on Thursday October 18, 2018 @02:35PM (#18250911)
Just to add on to that.

Very few programmers know the prior art wrt. OOP, or have worked with the kind of code in which OOP is done well (I guess "OOD", using the terminology from the article). Instead, almost all junior (even senior) programmers I encounter parrot something along the lines of OOP being too enterpris-y and crufty, and something about inheritance being stupid. OOP is dismissed out of hand. It's high time for a correction in that mindset. The ability to structure your data and the operations on that data together in place is incredibly powerful, and OOP is a good approach to do that.

Schools are partly to blame. They teach OOP as if it is an exercise in abstracting some sort of reality (e.g. "a dog barks, a cat meows, and both walk"). But that approach falls apart for the sort of concepts programmers work with. OOP is at its core a way to structure code, and to do so cleanly, to avoid repetition, and to enable easy navigation through a program. It is not intended to be mental map of some external reality.

Re:OOP Is Dead, Long Live OOP by discreteevent on Thursday October 18, 2018 @02:53PM (#18251069)
>The ability to structure your data and the operations on that data together in place is incredibly powerful.

Agreed. In a lot of cases if you don't have objects (the good parts) you are doomed to reinvent them:

https://www.cs.cmu.edu/~aldrich/papers/objects-essay.pdf

"Linux uses service abstractions in order to support multiple file systems. There are vtable-like structures such as file operations that are used to dispatch operations such as read to the code that implements file reading in a particular driver."

Re:OOP Is Dead, Long Live OOP by blarg1 on Friday October 19, 2018 @03:57AM (#18254908)
I don't really see a problem with reinventing things when you need them. Classes etc are just syntactic sugar on top of functions and structs.
Re:OOP Is Dead, Long Live OOP by jshowa1 on Thursday October 18, 2018 @02:18PM (#18250719)
Just because prior literature exists, does not mean it should not be superseded. For example, generics wasn't even a thing when OOP originally started and yet LINQ and basic list ADT's wouldn't be as powerful without it.
Re:OOP Is Dead, Long Live OOP by dragonwriter on Thursday October 18, 2018 @02:32PM (#18250868)
> For example, generics wasn't even a thing when OOP originally started

Generics werent part of the earliest OOP because generics only make sense with static typing and the earliest OOP languages were dynamically typed; generics were around other places around the time of early OOP, though.

Re:OOP Is Dead, Long Live OOP by mehrdadn on Thursday October 18, 2018 @02:21PM (#18250756)
> Just because prior literature exists, does not mean it should not be superseded. For example, generics wasn't even a thing when OOP originally started and yet LINQ and basic list ADT's wouldn't be as powerful without it.

No, this not an example... generics did not "supercede" OOP.

Re:OOP Is Dead, Long Live OOP by jshowa1 on Thursday October 18, 2018 @03:57PM (#18251606)
My point is that earlier OOP documents did not implement generics.

When they were finally implemented in OOP, it superseded the original intentions of OOP.

The question is, are we now supposed to remove generics because they don't conform to the early literature of OOP?

Looks like the OOP edited his comment though, so my point is irrelevant.

Re:OOP Is Dead, Long Live OOP by dragonwriter on Thursday October 18, 2018 @04:03PM (#18251644)
> My point is that earlier OOP documents did not implement generics.

> When they were finally implemented in OOP, it superseded the original intentions of OOP.

No, when they were implemented in static OOP, it brought static OOP closer to intentions of the original, dynamic, OOP, where generic-ness doesn't require parametric polymorphism.

Re:OOP Is Dead, Long Live OOP by mehrdadn on Thursday October 18, 2018 @04:05PM (#18251668)
> My point is that earlier OOP documents did not implement generics.

So what? Early cars didn't have AC, therefore AC superceded cars? Or therefore I'm somehow arguing we should use AC instead of cars?

> The question is, are we now supposed to remove generics because they don't conform to the early literature of OOP?

Who ever claimed such a thing in the first place? It certainly wasn't me. If there is any question like this under discussion, it is whether OOP should should be removed because generics somehow superceded them (your idea), not the other way around. In either case the answer is clearly No because the idea is obviously ridiculous and not something anybody suggested.

> Looks like the OOP edited his comment though, so my point is irrelevant.

Not sure what this is referring to, but I haven't been able to agree with your comment since it was initially written.

Re:OOP Is Dead, Long Live OOP by jshowa1 on Thursday October 18, 2018 @07:11PM (#18253130)
So you don't really know what I was originally talking about yet you continue to act like you do? My point was in a response to the OP's implication that somehow the original OOP literature was perverted by misunderstandings and wrong implementations of the current generation, as if the original OOP documents were somehow "pure".

I pointed out that just because the literature is original doesn't mean it can't be superseded. I gave generics as an example that was later implemented in OOP languages and fail to see how implementing these perverted the original intentions.

I was then told that OOP intentions were originally meant to be dynamically typed and that the static typing of generics was meant to put it towards the original intentions of this dynamic structure (this is untrue because Alan Kay just didn't like static typing, but didn't make dynamic typing a requirement for OOP). Upon further research, the earliest OOP concepts were explained in the 1960's and the first OO language (Simula) was statically typed and a superset of ALGOL 60 which was a language made in 1960, with Simula following in 1965. Smalltalk came in at 1972 (around the time of generics) and is considered the definitive OOP language which is dynamically typed.

So its hard to say, without direct sources, what the original intentions of OOP were, but considering OOP appeared before the first languages that contained generics (i.e. 1970's), generics is an idea that superseded OOP.

Considering the utility of generics, its clear that later concepts that were added to OOP did not somehow perverse the original literature.

So we've established the following: 1) The earliest OOP language (Simula) was statically typed. 2) Generics came in after Simula 3) The original intention of OOP could probably be attributed to Alan Kay, who created Smalltalk, but it borrowed heavily from Simula. And while Alan Kay coined the term OOP, the idea was not created in a vacuum as OOP concepts predate Smalltalk.

Hopefully this provides some clarification. But my guess is people will continue to misinterpret what I meant.