Comments on the Arjen Markus article: Design patterns and Fortran

  • Authors:
  • Henry J. Gardner;Viktor K. Decyk

  • Affiliations:
  • Australian National University, Canberra, Australia;California Institute of Technology, Pasadena, CA and University of California, Los Angeles, Los Angeles, CA

  • Venue:
  • ACM SIGPLAN Fortran Forum
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The article by Markus [1] discusses the subject of object-oriented (OO) design patterns and describes ways in which three well-known patterns might be implemented in Fortran 90/95. It appears that the idea of object-oriented design patterns in Fortran might just be coming of age and it is a very appropriate subject for discussion in a Forum such as this.We have been developing our own implementations of design patterns in Fortran 90/95 for some time and have one paper under review [2] and another being presented at the 6th Workshop on Parallel/High-Performance Object Oriented Scientific Computing (POOSC) in Nantes, France in July 2006 [3]. Our application area is particle-in-cell simulations in plasma physics, but the results that we have obtained will, we hope, be of interest to Fortran 90/95 programmers in general.Our own starting point with design patterns in Fortran 90/95 stems from the literature on object-based programming in that language [4-10]. Several authors have observed that the obvious unit of encapsulation, the Fortran 90/95 module, can be thought of as an object-based class: it can support a type which defines the stored data together with subprograms which can operate on that data. With some discipline and ingenuity, these authors have shown how to emulate the notions of object construction and destruction, inheritance and polymorphism. These emulations were actually implemented using object composition. For example, one child module might include another parent module in order to simulate inheritance. As Markus correctly points out, most of the famous design patterns are based on object composition and the authors of [4-10] have, frequently, been using design patterns as a way of simulating OO behaviour.Because the subject of OO design patterns in Fortran 90/95 is so fresh, there is ample scope for them to be presented in different ways by different authors. Whilst appreciating the clarity and relevance of Markus' expositions, we would like to make some points of criticism which we believe are important to a further discussion of this topic. The points we make refer to the ideas expressed in the book by Gamma et al. [11] which is considered to be the fundamental exposition of the topic of OO design patterns.