Modula-2

From EDM2
Jump to: navigation, search
Niklaus Emil Wirth
The designer of Pascal, Modula-2 & Oberon

Structured procedural systems language introduced by Niklaus Wirth in 1979, based on his earlier Modula language that in turn had taken its structure and keywords from the even earlier Pascal teaching language, but M2 adds systems programming features, modular and incremental compilation, and a number of "programming in the large" features, but loses some of the concurrent features of the earlier Modula.

Modula 2 was hugely influential in the field of informatics and at the least 50 other languages have been based on it in addition to having a direct or indirect influence on languages like Basic, Java, C# and Object Pascal, amongst the more notable languages that are based on M2 are Modula 3, Parallaxis, Yafl, Oberon, Oberon-2, IEC61131, Umbriel, Component Pascal and Zonnon.

Modula-2 was more popular on the 68000 based computers than it was in the Intel world and for a time it was more popular for professional software development on that processor family than C, in particular on the Atari ST and single board systems where it was frequently used for server OS development. The reasons for this appear to be the quality of the tools available, ETH had a public domain Modula-2 compiler available that had an excellent 68000 and NS32000 backends, and a number of third parties took that compiler and enhanced it for a number of systems.

By the time the Intel 386 arrived on the scene Wirth had however lost interest in M2 and had started concentrating on Oberon so there never was an equivalent PD release of the ETH M2 compiler for that architecture for smaller firms to build on, but toolkits nonetheless crop up in the unlikeliest of places, IBM for instance had an OS/2 hosted compiler that is believed to have originated on their RT 68000 system (IBM System 9000), that was used to develop parts of the original AS/400 operating system (Probably parts of the I/O system). Note that this was not related to the later OS/2 based IBM Oberon-2 system that was an independent development.

OS/2 implementations of Modula 2

Libraries

  • Numerical Analysis Library - Open Source - Current
  • PMI DxfOut - AutoCAD files output - Commercial - Discontinued
  • PMI DynaMatrix - Math/Engineering/Matrices - Commercial - Discontinued
  • PMI EEv - Algebraic expression evaluator - Commercial - Discontinued
  • PMI Macro2 - C like macro pre-processor - Commercial - Discontinued
  • PMI ModBase - dBase III/xBase interface and file compatibility - Commercial - Discontinued
  • PMI Repertorie - Low Level and system interface library - Commercial - Discontinued
  • PMOS - Open Source - Current.

Notable but unfinished projects

Modula-2 source code snippets, archives and collections

  • Modula-2 Algebra System (MAS) - Open source - Discontinued

OS/2 text & programmers editors with Modula-2 support

  • Boxer - Modula-2 syntax colouring support included by default - Commercial - Discontinued
  • BRIEF - M2 support included by default - Commercial - Discontinued
  • Emacs - With an optional mode download from Hobbes et al., see the links section on the Emacs page.
  • Enhanced Editor - Has syntax highlighting, auto-formatting and automatic code summary for Modula-2.

A list of DOS implementations of Modula 2

Libraries

  • Numerical Analysis Library - Open Source - Current
  • PMI DxfOut - AutoCAD files output - Commercial - Discontinued
  • PMI DynaMatrix - Math/Engineering/Matrices - Commercial - Discontinued
  • PMI EEv - Algebraic expression evaluator - Commercial - Discontinued
  • PMI Macro2 - C like macro pre-processor - Commercial - Discontinued
  • PMI ModBase - dBase III/xBase interface and file compatibility - Commercial - Discontinued
  • PMI Repertorie - Low Level and system interface library - Commercial - Discontinued
  • PMOS - Open Source - Discontinued.

DOS text & programmers editors with Modula-2 support

  • Boxer - Modula-2 syntax colouring support included by default - Commercial - Discontinued
  • BRIEF - M2 support included by default - Commercial - Discontinued

A list of Modula 2 implementations that support Win-OS/2

A list of Modula-2 implementations that run under Java

Editor or IDE support

Publications

Articles
Tutorials and other learning material
Reviews
  • L. J. Ribar: OS/2 Programming goes Modula-2 - Computer Language (Nov 1990) - pp 83-89
  • A. Schulman: Modula-2 and OS/2 Join Forces - BYTE (Aug 1989) - pp 171-174
  • D. Taylor: Software Reviews: Metrowerks Modula-2 PSE - Computer Language (Nov 1990) - pp 91-95
  • D. A. Righter: Programmer's Corner: TopSpeed Modula-2 with Object Extensions - Journal of Pascal, Ada & Modula-2 (Jul/Aug 1990) - pp 56-58
  • B. R. Anderson: Stony Brook Modula-2 - Journal of Pascal, Ada & Modula-2 (May/Jun 1990) - pp 69-73
  • S. R. Ladd: Modula-2 Compilers: New Kids on the Block Mature - Computer Language (Mar 1989) pp 99-110
  • Joel Pitt: Volition Systems' Modula-2 programming language - A review of the Volition Systems Modula-2 that became part of Pecan UCSD Pascal - InfoWorld 1983
  • M. E. Haltiwanger: Software Reviews: TopSpeed 1.12 - Journal of Pascal, Ada & Modula-2 (Jan/Feb 1989) - pp 54-56
Introductions

Links

  • A list of Modula 2 Books by Peter Moylan Outdated but fairly comprehensive up until the latter half of the 90's
  • Günter Dotzel: MODULA BIBLIOGRAPHY - Very old and outdated (1986), however at the same time very comprehensive.
  • Peter Moylan's Modula-2 page - Extensive collection of links and info on Modula-2 and OS/2.
  • Modula-2 Org - M2 info, links and a ISO M2 tutorial.
  • The MODulator - Modula-2 and Oberon articles from the gents behind the ModulaWare company in Switzerland, used to be a paper newsletter back in the day.
  • Oberon2.ru - Massive Russian site dedicated to all things Wirthian, forum in particular strong. Primarily targeted towards Oberon but quite a lot of M2 info there as well.

USENET

Standards

There are five basic variations of the Modula 2 standard, the first four are simply the four editions of the book "Programming in Modula 2" by Niklaus Wirth and are commonly known as PIM1, PIM2 and so on, the fifth is an ISO standard called ISO 10514-1 that extends the language somewhat and in addition to the standard proper there have been some optional additions to it since it was originally submitted, but the additions are rarely implemented.

  • PIM1 Original from 1979, no compiler apart from the original ETH m-code compiler is known to have implemented this version.
  • PIM2 A few DOS, UCSD and CP/M compilers implemented this standard, although most DOS compilers got upgraded to PIM3.
  • PIM3 The third edition is by far the most popular amongst compiler makers, who by and large shun PIM4, biggest change is better support for multi-dimensional arrays.
  • PIM4 The fourth edition, very few compilers implement this variant but one notable exception is the native OS/2 compiler Canterbury Modula-2. A HTML version of Wirth's fourth edition of "Programming in Modula-2" is available here
  • ISO10514-1 ISO standard Modula 2, slightly controversial since it adds quite a bit to the language, but most modern compilers implement this version. Adds a standardised library.
  • ISO10514-2 Adds an OOP layer
  • ISO10514-3 Adds generics