Modula-2

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

 * IBM Modula-2 - Internal use only, never released - Used for cross development of portions of the OS/400

16-bit
 * Logitech Modula-2
 * Magnum Modula-2
 * M2CC/C
 * Pecan UCSD Pascal - Add on package for the Pascal system
 * Stony Brook Professional Modula-2, Stony Brook QuickMod
 * TopSpeed Modula-2

32-bit
 * Cabot UCSD Pascal
 * Canterbury Modula 2
 * Gardens Point Modula-2 - Was available in both Commercial and Open Source variants
 * XDS-x86 Modula 2

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


 * Unfinished projects
 * Net Modula2
 * Modula-2 Algebra System (MAS) - Open source


 * Editors support
 * Boxer - Modula-2 syntax colouring support included by default
 * BRIEF - M2 support included by default
 * Emacs - With an optional mode download: m2emacs.zip
 * Enhanced Editor - Has syntax highlighting, auto-formatting and automatic code summary for Modula-2.

DOS implementations

 * Fitted Software Tools Modula-2 - Freeware
 * FTL Modula 2
 * ITC Modula-2 Software Development System
 * Gardens Point Modula 2 Was available in both Commercial and Open Source variants
 * Logitech Modula-2 - BTW the first Logitech mouse was made to support this development system.
 * M2CC/C
 * M2M-PC System - source available. Variant of the original m-code compiler from ETH.
 * Pecan UCSD Pascal - Add on package for the DOS hosted UCSD Pascal system
 * Stony Brook Professional Modula-2, Stony Brook QuickMod
 * TaylorModula-2
 * TopSpeed Modula-2
 * XDS-x86 Modula 2


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


 * Editor support
 * Boxer - Modula-2 syntax colouring support included by default
 * BRIEF - M2 support included by default

Win-OS/2

 * Stony Brook Professional Modula-2
 * TopSpeed Modula-2 - Cross compilation from DOS or OS/2 only

Java implementations

 * Canterbury Modula-2 for Java
 * modula2jcc - Open source.

Publications

 * Niklaus Wirth: Programming in Modula-2 reprint of the third edition.
 * Herbert Schildt: Advanced MODULA-2: Programming and Techniques - Prentice Hall 1987, ISBN 0-07-881245-3
 * John Gough; George Mohay: Modula-2: A Second Course in Programming – Prentice-Hall 1988, ISBN 0724808280


 * Articles
 * Niklaus Wirth: Modula-2 and Oberon - PDF - Historical overview
 * Jean-Pierre Dezaire: FileIO for COCO compiler generator implemented for Canterbury Modula 2.
 * BNF of the Modula-2 Programming Language BNF = Backus Naur Form = Backus Naur notation.
 * L. Geissmann: Separate Compilation in Modula-2 and the Structure of the Modula-2 Compiler on the Personal Computer Lilith
 * Modula and the Design of a Message Switching Communication System - This and sister publication The Design of Parallel Systems: An Application and Evaluation of Modula are historically interesting since it is one of the few instances of paper that describe actual use of Modula, the predecessor to Modula-2.


 * Tutorials and other learning material
 * Richard J. Sutcliffe: Modula-2: Abstractions for Data and Programming Structures Oriented towards institutional learning rather than self help and uses ISO M2, but fairly recent.
 * Dr. Mantis Cheng: A Gentle Introduction to Modula-2 A basic introduction to M2 that assumes some prior programming knowledge. Made for TopSpeed Modula-2 but uses fairly standard syntax.


 * Reviews
 * D. Taylor: Software Reviews: Metrowerks Modula-2 PSE - Computer Language (Nov 1990) - pp 91-95
 * 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


 * Introductions
 * Jim Merritt: Modula-2 language is worth it - Popular Mechanics 1984

Links

 * A list of Modula 2 Books by Peter Moylan Outdated but fairly comprehensive until the latter half of the 90s
 * 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
 * [news:comp.lang.modula2 comp.lang.modula2] - Very low volume

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