APPLEs: Advanced Procedural Programming Language Elements

Background and Motivation

Today's programming languages have received a considerable degree of complexity, raising the question whether all the concepts provided are really necessary to solve typical programming and software engineering problems. As an alternative to object-oriented and aspect-oriented languages, advanced procedural programming languages are proposed, which slightly extend the two basic concepts of classical procedural languages, i. e., data structures and procedures operating on them. By that means, it is possible to design programming languages which are much simpler to learn and use, while offering comparable expressiveness and flexibility.


The elements (or concepts) of advanced procedural programming languages are divided into two categories: core (i. e., essential) and additional (i. e., not essential) concepts.
The former comprise modules, global virtual functions, and open types, where each of these elements depends on the previous one, i. e., global virtual functions need the concept of modules (as the order of their branches depends on the initialization order of modules) and open types need the concept of global virtual functions (as their attributes are actually pairs of such functions).
The latter include concepts such as null values and user-defined operator symbols and control structures, which are more or less independent of the core elements and of each other, i. e., they constitute orthogonal concepts where each one is useful in itself. Null values are an exception, though, since global virtual functions and open types take advantage of them, but this dependency is actually not essential.

Both core and additional elements are basically language-independent concepts, i. e., they are not tied to a particular programming language. For practical purposes, however, most of these concepts have been implemented as extensions to C++ (yielding the language C+++), primarily since C++ offers a rich set of other useful concepts (such as function and operator overloading, default arguments for parameters, templates, namespaces, etc.) which can be successfully exploited either directly by programmers or indirectly by precompilers transforming the extensions to native C++ code. On the other hand, many of C++'s concepts (such as classes, virtual member functions, pointers, arrays, etc.) are superseded by advanced procedural programming language elements, rendering them almost ``deprecated'' in practice. In particular, C++ is not at all used as an object-oriented language in this project, but rather as a ``better C,'' i. e., a procedural language. Given these observations, it is a reasonable long-term goal to develop ``yet another programming language'' that first reduces C++ (or any other language) to a few essential concepts and afterwards extends it with the advanced elements described here.

The following sections contain brief introductions to individual advanced procedural programming language elements, some examples of their use, and (where appropriate) references to publications explaining them in more detail.

Core Elements of Advanced Procedural Programming Languages

Additional Elements of Advanced Procedural Programming Languages

Project Status

As of 2006, a large number of the concepts described above have been developed and refined over many years, giving them a high degree of maturity. They have been implemented as language extensions to C++ or other languages (Oberon-2 and Java), in order to make them immediately applicable in practice. The resulting language C+++ has been successfully used in education, i. e., lectures, students' programming projects, and master theses.

Since 2007, the follow-up project PureAPPL aims at the design and implementation of a Pure Advanced Procedural Programming Language.


In addition to the publications on specific topics, which are referenced from the respective sections above, the following papers provide an overall view on the topic of advanced procedural programming language elements.

[1] C. Heinlein: "APPLE: Advanced Procedural Programming Language Elements." In: W. Goerigk (ed.): Programmiersprachen und Rechenkonzepte (21. Workshop der GI-Fachgruppe; Bad Honnef, Mai 2004). Bericht Nr. 0410, Institut für Informatik, Christian-Albrechts-Universität zu Kiel, January 2005, 59-66. (PostScript, PDF)
An early workshop paper describing the background, motivation, and basic concepts of advanced procedural programming languages.

[2] C. Heinlein: Verbesserte prozedurale Programmiersprachen. Kumulative Habilitation, Fakultät für Ingenieurwissenschaften und Informatik, Universität Ulm, 2006. (PostScript, PDF)
A much more comprehensive and up-to-date summary of the project. (Unfortunately in German only.)

Christian Heinlein, 22.09.09