DEV Community

Discussion on: What common programming concept has the wrong name?

Collapse
 
togakangaroo profile image
George Mauer • Edited

Inheritance.

Which works nothing like regular inheritance where the originator is both dead and no longer possesses the thing.

When we use the term for Java style classes it is really a conflagration of 3 concepts. DRY by sharing definitions of data shape,a specific form of polymorphism, and namespacing of behaviors to the data shapes they operate on.

None of those maps super well to inheritance it even to is...a relationships and is the source of much confusion

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

Which works nothing like regular inheritance where the originator is both dead and no longer possesses the thing.

I find your definition of 'regular' inheritance interesting. It seems to completely ignore genetics, which is more likely to be where programming borrowed the term from than the legal concept.

Collapse
 
togakangaroo profile image
George Mauer

I suppose I did, mostly because I'm thinking of Java/C++ as the prototype for inheritance and well...the generics story there is not great. I don't know that I've ever heard the term used specifically about generics though, what is the context you're thinking of?

Thread Thread
 
ahferroin7 profile image
Austin S. Hemmelgarn

You inherit genetic traits from your parents. The exact term 'inheritance' isn't often used directly, but the verb 'inherit' is pretty common in discussions of classical genetics, and the concept of inheriting traits from some parent entity fits pretty well with the concept of inheritance in most programming languages.