Modules as objects in newspeak

  • Authors:
  • Gilad Bracha;Peter von der Ahé;Vassili Bykov;Yaron Kashai;William Maddox;Eliot Miranda

  • Affiliations:
  • Ministry of Truth;-;-;Cadence Design Systems;Adobe Systems;Teleplace

  • Venue:
  • ECOOP'10 Proceedings of the 24th European conference on Object-oriented programming
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe support for modularity in Newspeak, a programming language descended from Smalltalk [33] and Self [69]. Like Self, all computation -- even an object's own access to its internal structure -- is performed by invoking methods on objects. However, like Smalltalk, Newspeak is class-based. Classes can be nested arbitrarily, as in Beta [44]. Since all names denote method invocations, all classes are virtual; in particular, superclasses are virtual, so all classes act as mixins. Unlike its predecessors, there is no static state in Newspeak, nor is there a global namespace. Modularity in Newspeak is based exclusively on class nesting. There are no separate modularity constructs such as packages. Top level classes act as module definitions, which are independent, immutable, self-contained parametric namespaces. They can be instantiated into modules which may be stateful and mutually recursive.