Inheritance is an actively used design pattern created in 1969.

50Years Old
  • Inheritance ranks in the top 50% of entities I track
  • the Inheritance wikipedia page
  • Inheritance first appeared in 1969
  • I have 12 facts about Inheritance. what would you like to know? email me and let me know how I can help.

Languages with Inheritance include javascript, python, typescript

Example from javascript:

class B {}
class A extends B {}

Example from python:

class SumComputer(object):
   def __init__(self, a, b):
       self.a = a
       self.b = b
   def transform(self, x):
       raise NotImplementedError
   def inputs(self):
       return range(self.a, self.b)
   def compute(self):
       return sum(self.transform(value) for value in self.inputs())
 class SquareSumComputer(SumComputer):
     def transform(self, x):
         return x * x
 class CubeSumComputer(SumComputer):
     def transform(self, x):
         return x * x * x

Example from typescript:

class B {}
class A extends B {}

Last updated July 8th, 2019