Restrictions and things to come | Contents |
An interesting question is what should happen when the name of a top-level class or object in a package is redefined in the associated package object. For the moment, this is simply forbidden. But if we wanted to allow this, it would make sense to take the definition in the package object as the public interface of the definition in the package itself. Code from within the package could see the full definition, but code from outside the package could only see what's defined in the package object. That way, package objects could evolve into the backbone of a fairly advanced module system, which allows to flexibly combine interfaces with implementations.
Of course, this remains to be done, and the details remain to be worked out, but it opens up interesting possibilities.
Restrictions and things to come | Contents |