Inheritance

Applies to: general, python, cpp

Inheritance lets one class extend or specialize another. The derived class reuses the base interface and can override behavior.

struct Sensor { virtual double read(); };
struct Lidar : Sensor { double read() override; };

See also: class, virtual-function, interface