Modula-3 Introduction and Tutorials
Modula-3 is a programming language designed to be a successor to Modula-2. It was developed in the late 1980s, and took inspiration from (and tried to correct perceived problems with) Pascal and Algol.
The design of Modula-3 sought to include modern "high-level" language features such as multi-threading, exception handling, and automated garbage collection, while retaining enough power and safety to be useful as a systems programming language.
Modula-3 was widely influential among computer science academics, but never achieved widespread practical use. The most important contribution that Modula-3 made to the field of computer programming is the influence it had on the development of other languages: the designers of Java and Python both explicitly borrowed Modula-3.
Modula-3 Resources Online
There are plenty of old languages that still get a relatively large amount of use. Modula-3 is not one of them. Interest in Modula-3 seems to have peaked around the turn of the 21st century, and most of the online resources for the language have disappeared. We've found the best of the ones that are still online.
If you need to learn the language, these tutorials are the best place to start. Most of them were originally written during Modula-3's heyday in the 1990s.
- A Modula-3 Tutorial provides a "whilrlwind tour" of the language.
- Modula-3 Tutorials and Reference is an index of all the tutorials and reference documentation at opencm3.net.
- Writing an Operating System with Modula-3 is an in-depth analysis of a project to do exactly what it says.
- An archived copy of a Modula-3 tutorial from Columbia University is available from the Internet Archive.
Additional Learning Materials
- Object-Oriented Data Abstraction in Modula-3 is a five-chapter college course text on Modula-3's implementation of the object-oriented programming paradigm.
- Some Useful Modula-3 Interfaces is a technical report on interfaces — the recommended way for Modula-3 modules to communicate with each other.
- Trestle Tutorial covers use of Trestle, a window system (GUI) toolkit for Modula-3.
- Modula-3: Introduction is a detailed look at the language, with information about its history, key features, design, and relationship to other languages.
- The Modula-3 Programming Language is 1994 article from Dr. Dobb's Journal, providing a high-level technical overview of the language.
- This Modula-3 article, originally printed in USENIX in 1992, provides a high-level technical overview of the language, and traces its lineage back to Algol.
- The A-Z of Programming Languages: Modula-3 is a 2008 interview with Luca Cardelli, one of the original Modula-3 designers.
Modula-3 Reference Materials
- The Modula-3 Home Page is the official source for all things Modula-3 related, and includes links to a number of useful Modula-3 resources.
- Introducing Modula-3 is a classic article on the language from the December 1994 edition of Linux Journal. The article does a great job explaining how and when Modula-3 can be a better tool than C or C++ for certain types of development projects.
- Modula-3 report is the original definition document on the language.
- The c2 wiki article on Modula-3 is an interesting, if chaotic, look at a wide array of opinions and observations on the language.
- From ML to C via Modula-3 is an interesting 1994 paper on the place of Modula-3 in the Computer Science curriculum at the University of Cambridge.
- Modula-3 Frequently Asked Questions and Answers is a place to find answers to all the Modula-3 questions you might frequently be asking.
- Threads: A Modula-3 Newsletter was a journal on Modula-3 published in the late 1990s. Copies of original issues are available online.
If you are doing academic research on Modula-3, you should check out the Modula-3: Annotated Bibliography. This page provides references to books, papers, and articles related to Modula-3, many of which are academic or highly technical. Unfortunately, most of the links are now inaccessible, but this will give you a place to start when searching at your university library.
- Critical Mass Modula-3 is the most popular Modula-3 compiler; the cm3 Modula-3 compiler is also available as a GitHub repository.
- Polytechnique Montréal Modula-3 (PM3) is an open source Modula-3 compiler, along with a development system and a suite of useful libraries.
- SWIG can be used to connect Modula-3 to libraries written in C and C++.
- Persistent Modula-3 is an extension of Modula-3, with support for orthogonal persistence and transactions.
- SPIN is an experimental operating system built using Modula-3.
Books on Modula-3
- Modula-3 (1992), by Samuel P Harbison, is a complete guide book and reference manual on the Modula-3 language.
- Systems Programming With Modula-3 (1991), by Greg Nelson, is an in-depth exploration of the language — required reading for anyone interested in Modula-3 or the history of programming languages.
- Algorithms in Modula-3 (1993), by Robert Sedgewick, provides cook-book style code examples of important algorithms written in Modula-3.
- Programming in Modula-3: An Introduction in Programming with Style (2011), by Böszörmenyi and Weich, is a reprint of a classic 1996 book on the language.
Should I learn Modula-3?
For most people, the answer is no.
If you find yourself needing to debug or maintain legacy Modula-3 code, then obviously you need to learn the language. Those particularly interested in the history of computer programming should be familiar with Modula-3, as it played an important an important part in the development of language theory, and led to the creation of Java and other similar languages.
For the average working developer, however, it is hard to see how learning Modula-3 will provide a practical benefit.
Further Reading and Resources
We have more guides, tutorials, and infographics related to coding and development:
- C++ Developer Resources: if you'd rather stick to a more traditional language, this page provides you with all the tools you need.
- ML Resource and Introduction: originally a meta-language (a language for creating languages), it has found an important place in programming education.
- Java: Introduction, How to Learn, and Resources: want to see where Modula-3 led? Check out this guide.
What Code Should You Learn?
Confused about what programming language you should learn to code in? Check out our infographic, What Code Should You Learn? It not only discusses different aspects of the languages, it answers important questions such as, "How much money will I make programming Java for a living?"