Development of an Object Oriented Language that Integrates several State of the Art Concepts

ir. Adriaan Moors
Prof. dr. ir. E. Steegmans (promotor)
ir. Marko van Dooren (supervisor)



Programming languages have come a long way. Just a couple of decades ago, programmers had to punch holes in cardboard to program their computer. More recently, the object oriented paradigm has come to rise. But this is certainly not the end of the road: since then, ideas such as component based programming and aspect oriented software development have evolved into concrete programming languages or extensions to existing languages. In this thesis we have tried to define a new language that can be seen as a step in the evolution towards more high level, more powerful programming languages.

In search for a more powerful language, we aimed to 'absorb' certain common programming practices (such as those captured in design patterns) into the language. This goal stemmed from the observation that often, the existence of a design pattern originated from a lack of expressiveness in the used programming language. Similar to the way in which object oriented languages made the 'class design pattern' obsolete, we aimed to make certain still existing design patterns part of our language. In doing so, we were always concerned with the bigger picture: it is easy to just stack up all the interesting concepts and then call it a new language. This was certainly not our goal. We set out to research the current state of the art in language technology and select the most interesting and advanced ideas so that bringing them together may yield a powerful yet compact language.

The ideas that were brought together have two common goals: on the one hand, the language should be dynamic, to satisfy the needs of modern applications that often have to run uninterrupted in environments that are constantly changing – distributed middleware applications, for instance. On the other hand, the language should provide support for keeping complex applications understandable and manageable: this calls for features that allow statically checking the correctness of parts of the application in isolation, so that the whole can be understood by studying the pieces separately.

A good example of a language feature that supports both goals is object-based inheritance (also called – albeit misleadingly – delegation): it significantly enhances the power of the classical inheritance scheme that is based on classes – and therefore is quite rigid – by bringing inheritance to the level of objects, without losing the advantages of modular static type checking. The latter is an important asset when studying pieces of a large body of software. Furthermore, we enhanced Design by Contract by introducing new ideas such as crosscutting constraints: a way to encode crosscutting concerns in the contract of classes, thereby bringing an otherwise static feature to the dynamic level. Our notion of contracts is also enriched by context information so that fine-grained access control becomes possible, among other things.

Because we strongly feel that ease of programming and quality of software are highly related, we introduced native support for associations and properties, concepts that are normally only available at the design level. This may appear to introduce more features, thereby making the language more complex; we feel, however, that the gained expressiveness largely offsets the cost of the added complexity. Similar to the reasoning about design patterns, we feel that explicit programming of support for (bidirectional) associations should be made unnecessary by an expressive language.

Another effort to further increase the quality of software written in our language comprises the endeavor of unifying related concepts. This resulted in the integration of access control and contracts, in the broadening of dynamic binding to also include state features – properties and associations, the treatment of class-based inheritance as a special case of object-based inheritance and the exclusive use of objects as the unit of information. This last point means that everything is modeled as an object – numbers, strings and more complex structures alike. It also led to the introduction of metaclasses, which resulted in further unification of concepts: the implementation of genericty using meta-properties are but one example.

To conclude, the goal of this thesis was to develop a dynamic object oriented language which resulted from the unification of the current state of the art and our own ideas. The concepts that define the language can be divided into two groups: the dynamic and the static ones. Examples of the former are: object-based inheritance, fully dynamic binding, metaclasses and a flexible typesystem. These were incorporated to satisfy the need of modern applications. The 'static' concepts served to facilitate the understanding and checking of the correctness of software. Most prominent in this category were: our enhanced Design by Contract and the support for modular static typechecking.