Elena,
when you say that "Object will be the superclass anyway" you "semantically" mean that classes declared with no parent will behave assuming as parent a class which (regardless of its name?) has certain methods, such as equality, identity, String accessor, etc?
So what will happen if one declares a class named "Object"? I guess nothing bad should happen since this would be interpreted as a different class. Is this correct?
Short answer: Yes.
Long answer:
1. Recall that the superclass is a message send; the effect of using a superclass name in the top level class' superclass clause would be to send a message to its enclosing object, which is nil.
2. Such a send should fail with a doesNotUnderstand:, because nil has no public method Object (or any other public method that returns a class).
3. Caveat: since access control is not implemented, if nil inherited an accessor for Object like other Newspeak classes, that could be used. However, we currently use Squeak's nil, and we can easily arrange for it to call doesNotUnderstand: in such cases.
4. In the absence of an explicit superclass, the current Platform's Object class will be used.
5. The Platform's Object class should not change when you choose to define a class named Object.
6. Defining a class Object might change the binding of Object in your IDE's namespace. The concept of the platform is distinct from the concept of the IDE namespace. The IDE namespace is a service provided by a particular application. In our case, HopscotchIDEApp.
7. Our IDE's namespace makes it convenient to evaluate expressions etc. by providing a namespace of all top level classes loaded in the IDE. Rebinding Object may be quite inconvenient in that context, but should not effect existing classes.
8. Other IDE applications may vary (e.g., providing multiple projects etc.). No such application has any impact on the Newspeak semantics.
9. Currently, we sometimes conflate the notions of Platform and the Squeak system dictionary, Smalltalk, which is the Squeak IDE's namespace. This means that redefining Object (or Class, or quite a few additional key classes) will have catastrophic consequences, as you observe.
10. In reality, the latter is a very insignificant issue. Practically speaking, people do not redeclare these classes, just as they do not redeclare them in Java or C# (where they simply have no option).
11. You can define nested classes named Object, Class or whatever. This will only affect code inside your class.
12. We could make the superclass clause syntactically illegal at the top level. This may be a good idea pragmatically, but I find it inelegant.