News for hackers. Stuff that matters.
Re:Complexity is a source of income in open source ecosystem... by edumucelli on Monday May 24, 2021 @06:41PM (#27270534)
Inheritance was invented for performance reasons [1]. It was not conceived for pure code organization, so in way it is arbitrary as any other solution that could have brought performance gains for the original garbage collector. Inheritance is an "intellectual accomplishment" as other accomplishments, that will incur into issues if applied blindly, so not having it is not an issue per se. On the contrary, today's widely accepted view of inheritance is to rather use composition instead of it [2].

R does have inheritance by the way, not as you will see frequently on "general purpose" programming languages, thing R is not.

[1] http://catern.com/inheritance.html [2] https://books.google.pt/books?id=ka2VUBqHiWkC&pg=PA81&lpg=PA...

Re:Complexity is a source of income in open source ecosystem... by galaxyLogic on Monday May 24, 2021 @11:15PM (#27272253)
I would say that "inheritance" was much developed in Smalltalk, and there it was not really a tool for improving performance. Rather it is a conceptual tool.

"Inheritance" is really the expression of Abstraction in code. Superclass is more general, and thus the abstraction of its subclasses.

Although Smalltalk did not have a specific keyword for "Abstract Class" it used the convention of calling "subclassResponsibility" on methods defined in abstract subperclasses which had to be implemented in subclasses.

Abstraction, generalization, these are conceptual tools. I'm not sure how "composition" models abstraction if at all. Only OOP does.

And one could think that abstraction is a tool valued by scientists. No?

Re:Complexity is a source of income in open source ecosystem... by spfzero on Tuesday May 25, 2021 @01:17AM (#27272853)
I don’t know why you are saying inheritance was invented for performance reasons? Is there any evidence behind that?

Everything I was taught when OOP became mainstream in the late 80s, was that it was a performance trade off to afford code organization insight, while preserving encapsulation.

This statement about “performance reasons” is quite baffling.