Sun, 11 Sep 2011
Is Super Super? Or is it really Sub?
Another quick random post on something I was thinking about the other day.
So in object oriented programming, we call the class that another class inherits from the super class. Now this is curious. Why? Because if you think about the word superset, this means a set containing all the elements of the set/s it is made up of, and possibly more. Now, isn't that what a so called sub class is?
So I think that Sub classes should really be called super class and vice versa. And that way you can rotate the hierarchy picture of classes in your head, to represent the way a tree actually grows, from bottom to top. And when you do that, what were sub classes would actually be super classes, given the fact that they would conceptually be higher than the class they inherit from.
Just a thought.





