More about namespaces

  • The lobby has two parents:

      defaultBehavior contains methods of general applicability.
      globals provides a global namespace for prototypes.

    Additional namespaces (deprecated):

    • traits organizes the globally-accessible traits objects
    • mixins does the same for mixins
      (objects intended to be used only as parents, similar to abstract classes).
  • More about namespaces

    The lobby has two parents, in fact. The other parent slot is called defaultBehavior, and it contains methods applicable to all objects (such as the identity test, ==, and default implementations of printString, error: and halt).

    Any object that inherits from the lobby can therefore respond to the messages defined in defaultBehavior, and access the prototypes via globals.

    Separating defaultBehavior from globals allows an object to choose to inherit from one but not the other, if that is appropriate.

    Other namespaces

    The lobby contains two additional namespaces, accessible via non-parent slots:

      1. traits contains a collection of other traits.
      2. mixins contains trait-like objects intended to be used as mixins (i.e., their children all have other parents, which provide the main functionality).
    We are gradually moving away from the use of these namespaces. New applications do not tend to add to these namespaces, but keep their traits and mixins locally. Examples: webBrowser, transporter, smalltalkEmulator. This avoids potential name clashes in these spaces.

    [ Previous ] [ Index ] [ Next ]