+ 1
Circle Inheritance?
I know that in Python its not possible to inherit classes so you can make a circle. But is it possible in other programming languages? (C++, Java, Ruby)
2 Answers
0
just by thinking about it, i dont think this is possible, as this would mean that classes inherit themselves at one point (and will have to inherit everything in an infinite loop, woo)
also, i just tried making something like this in cpp. I couldnt make base class inherit from the daughter class, as for this i have to define daughter class before the base class, and then compiler complains about redifinitions and incomplete types
0
The only language I'm aware of that supports circular inheritance is Unicon.