The Tingle Programming Language

Dirk van Deun, dirk at

An Introduction to Tingle


Download the interpreter prototype and documentation here.

Many innovations in object oriented programming are about avoiding multiple inheritance. Mixins, traits, interfaces all serve this purpose. Tingle is a whole new language that grew out of a single idea about how to avoid multiple inheritance. One day I realized that to extend both the class Car and its subclass Taxi with a draw() method, what I actually wanted to write was this one new component to combine with both:
  as Car {
     def draw() { ... }
     as Taxi {
        def draw() { ... super.draw() ... }
        // specialize
It combines with Car and Taxi according to its nestings, without dependence on order (as mixins have) or need for glue code (which traits require). It can also carry instance variables. As befits a good computer scientist, I then started to explore whether it was feasible to write complete programs using only such components. This grew into a language, which I called Tingle, and into a style of programming with classes but without inheritance that I call idea oriented programming.