-- Inheritance: shape prototype: shape_proto= {family="shape"} function shape_proto:get_species() return self.species end function shape_proto:get_family() return self.family end setmetatable(rectangle_proto, {__index=shape_proto}) setmetatable(circle_proto, {__index=shape_proto}) print(circle:get_family().."/"..circle:get_species()) --> shape/circle print(rectangle:get_family().."/"..rectangle:get_species()) --> shape/rectangle