Abstract-Programming efficient and reliable code can be considered a non-trivial task, as it requires deep understanding of the problem to be solved along with good programming skills. However, software frameworks and programming paradigms can provide a dependable infrastructure upon which better programs can be written and deployed. This allows engineers to focus mainly on their task, while relying on the underlying run-time environment for taking care of low-level programming issues, such as memory allocation and disposal, typing consistency and interface compliance.
1In this paper, we argue that strong-typed programming languages and paradigms offer a valid support for the production of reliable programs. Aware of the challenges of formal measurement metrics for code quality, we present the benefits of strong-typing by considering a practical application: The design and implementation of RoboX, a tour-guide robot for the Swiss National Exhibition Expo.02. The example is extremely well suited for such a discussion, since complex mechatronic applications can be considered critical systems-i.e. systems whose failure may endanger missions, lives and society-thus their reliability has to be made a prime concern.
I.INTRODUCTIONIn the pioneering era of calculating machines, computers were programmed using primitives, which were able to directly instruct the underlying processor architecture. These instructions were either coded as sequences of digits-the machine language-or, more conveniently, in a human-readable version-the assembly language-which would be translated to machine language by a so-called assembler. Machine and assembly language are sometimes referred to as the first two generations of programming languages.In the sixties developers began to realize that programs written in assembly language were tedious to write, the produced code was tied to a particular processor architecture and their engineering was extremely error-prone, as the semantic gap 2 was too large.The third generation of languages represented the dawn of the high-level languages. They contributed to the reduction of the semantic gap by taking care-through compilers and interpreters-of the mapping between language constructs and the underlying instruction set.The past thirty years witnessed many new languages and paradigms, such as imperative or procedural languages (e.g. C, Oberon), logical (e.g. Prolog), functional (e.g. ML) and objectoriented (e.g. C++, Java, Eiffel, Oberon-2). The new paradigms also introduced new features such as the strong-typing. Examples of strong-typed programming languages can be found in the Ada, Java and Oberon programming languages. C and C++ are sometimes described as strongly typed, they are indeed weakly typed.The need for a safe type system in programming languages was a logical consequence derived from a set of requirements, coming from developers looking for rapid development-time and ease of maintenance, without having to pay to incur in performance penalties. A milestone achievement for the definition...