It would be quite nice to be able to inherit const...
# language-evolution
s
It would be quite nice to be able to inherit constructors. Often I am subclassing to change behavior or add functionality, without changing the fundamental requirements for constructing an instance. (e.g AstronomicalCalculator with basic things like sunrise and sunset, and ComplexAstronomicalCalculator which takes into account elevation - both need latitude and longitude).
h
How should it differ from
super
?
w
There have been discussions around adding static functions/companion objects to the contract of interfaces (constructors are just a static function) in the forum, or even in this channel. Feel free to create a proposal, be sure to give them good use cases to improve your odds 🙂
s
@hfhbd I need to re-write every single constructor for a subclass.