If I have "Object" as the top level class, then I have various interfaces,
ISomething, ISomethingB, ISomethingC, then I have
Class x,y,z, all ultimately deriving from the class Object (these subclasses don't have to derive from each other), wouldn't me having one class at the top like "Object" in .NET lead to, or possibly lead to, type safety issues like:
Object myText = "Johnny";
string myText = "Johnny";
If I used the former, does that mean I could do something like this?
Object myText = "Johnny"; double someValue = 0.0; someValue = "Johnny";
That doesn't make sense, but is it legal?
Should there always be a main object at the type of a class hierarchy like in .NET from which all others derive?
As an example, take a school application.
Students, Staff, Classes, Grades, and so on.
Should there be a top level object like "School" and have all of those classes or interfaces below it? I can't think of why I'd do that. Why not have four or five top level classes that do not intersect anywhere?
Edit: I have read, Why all classes in .NET globally inherits from Object class?