"Objects first, interfaces next" or interfaces before inheritance

  • Authors:
  • Axel Schmolitzky

  • Affiliations:
  • University of Hamburg, Germany

  • Venue:
  • OOPSLA '04 Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Objects first is a pedagogy that tries to introduce the core concepts of object-oriented programming - classes, objects, and methods - as early as possible in a programming course, even before variables, types, assignments and control structures are explicitly introduced. The concept of a named interface is typically introduced at a much later stage, usually in connection with inheritance, polymorphism, and abstract classes. In this paper we point out that interfaces as a language mechanism can be introduced much earlier, even before inheritance. This way the concept of an explicit class interface can be decoupled from the more complicated issues of inheritance and subtype-polymorphism.