Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

Inheritance

< >
Example from 2 languages: JavaScript, TypeScript
class B {} class A extends B {}
Example from 1 languages: 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 1 languages: Speedie
class Person (Animal)
*

Languages with Inheritance include JavaScript, Java, Python, PHP, TypeScript, Scala, CoffeeScript, Dart, Pug, Groovy, Twig, Speedie, C3, Aardvark, SystemVerilog, Apex, JS++, spider, SpiderBasic

*

Languages without Inheritance include progsbase

*

View all concepts with or missing a hasInheritance measurement

*

Read more about Inheritance on the web: 1.

View source

- Build the next great programming language About Acknowledgements Extensions Day 630 Donate feedback@pldb.io