Modula-3

Modula-3 is an imperative, object-oriented programming language. It sees itself as a successor of Pascal, Modula -2, Modula -2 and Cedar ( programming language) and was developed by DEC and Olivetti. It was developed in the tradition of the languages ​​of Niklaus Wirth, from the viewpoints of simplicity and rigor in the development Wirth, however, was only involved as a consultant. The simplicity here refers to the language scope ( The language definition of Modula-3 includes 60 pages ) and not on the length of the programs or to an orientation towards personal development habits.

Properties

Modula-3 has the following properties:

  • A clean and robust syntax
  • Strict and static types Ordinal types: integers, enumerations, character, logical values
  • Sub-ranges of ordinal types
  • Amounts in excess of ordinal types
  • Fields with ordinal types of indexes
  • Floating-point numbers
  • Texts
  • Data networks and objects
  • Subroutines and functions

The above concepts have been implemented downright minimalist. This shortens the learning curve for someone who is familiar with these concepts.

  • Object orientation consists essentially of the type OBJECT.

TYPE      T = OBJECT            a: INTEGER;          METHODS            m ( arg: CHAR ;): = P;          END; This defines the type T for objects which contain the object variable a and the method m. The method m is implemented by assigning her a procedure P. This must be the signature   PROCEDURE P ( self: A; arg: CHAR; ); possess. There is no excellent methods such as constructors and destructors. However, object variables can be put by type definition in a defined initial state. Encapsulation is achieved by the well-known of Modula-2 separation into interface and implementation. Due to the partial detection of subtype relations ( REVEAL ) arbitrarily fine gradations can also define access options also. This is in some ways a generalization of the public - private - protected- hierarchy and friends arrangements of C .

  • With parameterized types data structures can be implemented with generic modules. Generic modules differ from normal modules through module parameters. In a way, one can thus keep selected IMPORT statements variable. Disadvantage of this simple realization is that generic modules can not be translated directly, but only their occurrences.

Development

The DEC was sold to Compaq in 1998; this in turn left in 2002 in Hewlett -Packard on. Maintenance and development of sources of key Modula - 3 compiler was acquired by Elego Software Solutions. Since the acquisition, especially Critical Mass Modula-3 is constantly evolving. The sources and binary packages for a number of operating systems can be downloaded free ( under a slightly restrictive license as compared to the GPL).

577557
de