|
|
|
|
|
by professoretc
1778 days ago
|
|
There was an experimental language called Cecil that had "conditional inheritance". You could say things like class Rectangle:
var w,h
class Square(Rectangle if w == h):
...
You could then overload functions/methods on both `Square` and `Rectangle` and it would call the correct overload depending on the runtime values of `w` and `h`. |
|