Channels ▼

What's New With Modula-2?


K.N. King is an associate professor of mathematics and computer science at Georgia State University. He is the author of Modula-2: A Complete Guide, published by D.C. Heath, and a former columnist for the Journal of Pascal, Ada & Modula-2. Use either on Internet or knking on BIX to reach him.

Modula-2, Niklaus Wirth's successor to Pascal, is no longer the new kid on the block. It's a mature language with a growing international following, although it has yet to become a major force on the scale of Pascal or C.

Of course, Pascal and C didn't experience great popularity when they first appeared, either. But 1991 could be the year that Modula-2 breaks into the ranks of major languages. In January, PC Week proclaimed that Modula-2 "is just more than eight years old -- less than half the age of C -- and is ready to enjoy the same surge of interest that C received during its own ninth year, in 1981."

What makes 1991 such an important year? For starters, the international standard is expected to be completed -- although not formally approved -- this year. New versions of the three major DOS compilers are due. In September, the Second International Modula-2 Conference is expected to draw hordes of enthusiasts to England.

1991 also presents serious challenges for Modula-2. In particular, Modula-2 faces stiff competition from languages such as Ada and C++. Modula-2 is even in danger of being upstaged by its own offspring, Oberon and Modula-3.

In this article, I'll assess how Modula-2 is doing, describe the status of Modula-2 standardardization efforts, discuss the latest Modula-2 compilers, and tell you how to find out more about Modula-2, Oberon, and Modula-3.

Whither Modula-2?

So how is Modula-2 really faring? Hard data is difficult to obtain, but Rich Gogesch of Stony Brook Software estimates that there are roughly 150,000 Modula-2 users worldwide. That's a respectable number, but nowhere near the number of Pascal or C users. In the U.S., Modula-2 use is reportedly static: Current users are pleased but the language isn't attracting many new converts.

In other countries, the story is different. According to Steve Collins of Real Time Associates, a British Modula-2 vendor, Modula-2 is "beating the pants off" C in the European embedded systems arena. What's more, he notes that almost all U.K. university graduates urrently learn Modula-2 as their primary language; the one university that doesn't teach Modula-2 is expected to adopt it this fall. American vendors have noticed the strength of Modula-2 in Europe. Gogesch, for example, estimates that two-thirds of Stony Brook's sales are made there.

Why isn't Modula-2 as popular in the U.S. as it is elsewhere? There was once a lack of high-quality compilers, but today's Modula-2 compilers compete with the best C compilers for compilation speed and code quality. The real reasons are more subtle. First, Modula-2 has failed to distinguish itself from other languages, notably Turbo Pascal. Modula-2 has never achieved "critical mass" in the way C and Pascal have; users complain about the shortage of third-party Modula-2 libraries. The lack of an official standard for the language--and especially the libraries--has not helped. Also, Modula-2 doesn't get the publicity that newer languages do; Gogesch feels that the hoopla surrounding C++ in particular "has hurt Modula-2 quite a bit."

Plenty of programmers agree with Gogesch that, "in terms of large program development, there's nothing as good as Modula-2." In the U.S., Modula-2 is used by a surprising number of companies; however, small users don't get much attention and large firms often shun publicity. A classic example is the defense contractor whose 50 programmers write everything for Modula-2, then use a translator to convert their code to Ada before delivery.


An international standard for Modula-2 has been making steady progress since 1987, when working group ISO/IEC JTC1/SC22/WG13 first began to meet. A draft proposed standard was issued in late 1989 and a revision has been in preparation since mid-1990; it is expected to be ready by the time WG13 meets in Germany this summer.

For various reasons, work on the standard has slowed recently. WG13 continues to make major language changes even at this late stage; working out the implications of these changes takes time. The standard will use VDM-SL (the Vienna Development Method Specification Language) to specify the semantics of Modula-2. Using VDM-SL adds rigor to the language definition but increases the amount of time required to draft the standard. And unfortunately, members of WG13 still disagree concerning such basic issues as the philosophy behind the I/O library.

The draft proposed standard makes a number of changes to Modula-2. Because of limited space, I can't describe them all, but I'll try to hit a few of the high points. For more details, order a copy of the draft standard or read my Modula-2 column in back issues of the Journal of Pascal, Ada & Modula-2.

Structured Value Constructors. The draft standard adds "structured value constructors," which construct array and record values from their components in a manner similar to Ada aggregates. For example, if T is an array type (say T = ARRAY [0..3] OF INTEGER), the expression T {1, 2, 3, 4} constructs an array of type T containing 1, 2, 3, and 4, in that order. Records are constructed in the same way.

Complex Numbers. One of the surprises of last year's WG13 meeting was the decision to provide support for complex numbers. The current plan is to add COMPLEX and LONGCOMPLEX types to the language and ComplexMath and LongComplexMath modules to the library.

Strings. Modula-2's string handling deficiencies are well known. At one point, WG13 considered putting an "honest" string type in the language--a type whose representation would be hidden from the programmer. The working group acknowledged the value of such a type, but felt it to be too great a language change. Instead, WG13 added both a standard function named LENGTH that computes the length of a string and concatenation symbol for string literals and constants. The group is also attempting to define a standard Strings library module.

Input/Output. Improving the I/O library has been a top priority of WG13 from the beginning. Unfortunately, the members don't always agree on how the library should be improved. Some favor an industrial-strength library; others prefer a simple, streamlined library suitable for writing example programs and textbooks. The library in the first draft proposed standard leans in the former direction; it contains a hefty 23 modules and 201 procedures. After much discussion at last year's meeting, WG13 agreed to simplify the library.

The SYSTEM Module. The SYSTEM module, Modula-2's source of machine-dependent features, has undergone a great deal of change. To give just one example, the type LOC has been added in an attempt to make porting programs between byte-addressable and word-addressable machines easier. LOC represents the smallest addressable unit of memory; on some machines, a LOC value will be a byte; on others, a word.

More Details.

Exception Handling. WG13 has long favored adding exception handling to Modula-2, but members disagreed over which exception-handling model to use. In fact, when the first draft standard was issued, they were still considering two different proposals; both are described in an appendix. At last year's meeting, WG13 agreed to adopt a mechanism somewhat similar to C's setjmp/longjmp. The latest proposal, which adds an EXCEPTIONS module to the library, actually provides a more powerful mechanism than setjmp/longjmp. In particular, the RETRY procedure allows a program to redo an operation that failed because an exception was raised.

Copies of the first draft proposed standard are available from the IEEE Computer Society (see "Modula-2 Resouce Guide") for $35; ask for "ISO/JTC1/SC22/WG13 draft of DP10154 - P1151 Modula-2." (Members of MODUS, the Modula-2 User's Assocation, can obtain the draft at a reduced rate.) The next draft should be available later this year.


One sign of Modula-2's maturity is the number of high-quality implementations available. This is especially true in the DOS world, where TopSpeed Modula-2, Stony Brook Modula-2, and Logitech Modula-2 lead the market. According to a recent review in PC Week, "these three products rival offerings for better-known languages such as C and Pascal, from better-known vendors such as Borland and Microsoft.

Jensen & Partners international recently released Version 3.0 of TopSpeed Modula-2. Version 2.0 was the first to include support for object-oriented programming; Version 3.0 adds multiple inheritance and support for data hiding. Another feature of Version 3.0 is an automatic overlay system for both code and data, making it possible to write DOS programs as large as 16 Mbytes.

JPI now sells compilers, for C, C++, and Pascal as well. All TopSpeed compilers plug into a common environment and share a common code generator, making multilanguage programming easy. Because of the environment's language independence, it is now sold separately from the Modula-2 compiler. The VID debugger is included with the environment.

TopSpeed Modula-2 is available in both DOS and OS/2 versions. The optional Professional Techkit supports Windows 3.0 development.

Version 2.2 of Stony Brook's Professional Modula-2 compiler came out last October; it features full support for Windows 3.0 and OS/2 1.2. Version 3.0 should appear late this year or early next year. Current plans call for 3.0 to support object-oriented extensions compatible with those found in Turbo Pascal. Version 3.0 promises additional optimizations as well.

Logitech Modula-2 has been taken over by MultiScope Inc., a Logitech-owned enterprise best known for its debugger. Version 4.0 of Logitech/MultiScope Modula-2, which should be out by the time you read this, is actually the Stony Brook system, modified to retain compatibility with Logitech Modula-2 3.0. MultiScope is already at work on Version 5.0 of the compiler, which is being developed in-house.

In the Macintosh arena, the leading compiler is Metrowerks Modula-2, which comes in two versions: the Professional Standalone Edition and the MPW version. A student package, the StartPak, sells in college bookstores for $39.

Modula-2 compilers are also available for a huge number of other platforms. The best source for compilers (and Modula-2 books as well) is the catalog published by Real Time Associates. The catalog is accompanied by a newsletter containing the latest Modula-2 news, gossip, and more; the current issue even includes a Modula-2 crossword puzzle!


The First International Modula-2 Conference was held in 1989 at Bled, Yugoslavia. The conference drew 120 participants from 14 countries. Niklaus Wirth not only gave a keynote speech but also attended most sessions and participated vigorously in discussions.

The Second International Conference, to be held September 11-13, 1991 at the Loughborough University of Technology in England, should draw an even larger crowd. The conference will be preceded by a one-day workshop that gives an overview of Modula-2 and describes its advantages over older languages. Wirth is again expected to attend.

User Groups and Publications

The primary Modula-2 user group is MODUS (the Modula-2 User's Association), which publishes the MODUS Quarterly. Another way to meet Modula-2 users is to join USUS, the UCSD Pascal System User's Society, which has expanded to serve "the Pascal, Modula-2, and portable programming community."

With Modula-2's popularity in Britain, it's no surprise that the British Computer Society has its own Modula-2 Specialist Group, which is open to all interested parties. Because the ISO standard is being drafted in England, joining this group is a good way to keep track of the standardization effort. A membership application form is included with the Real Time Associates catalog.

Several online services and networks feature coverage of Modula-2. BIX (the Byte Information Exchange) is an excellent place to meet other Modula-2 fans in the modula.2 conference. Many Modula-2 compiler vendors have conferences on BIX. On CompuServe, check out the CodePort (formerly MUSUS) forum operated by USUS. Although CodePort is nominally devoted to portable programming languages in general, discussions of Modula-2 often dominate. On Usenet, Modula-2 is discussed in the comp.lang.modula2 newsgroup. Incidentally, comp.lang.modula2 can be reached from BIX and FidoNet.

With the demise of the Journal of Pascal, Ada & Modula-2 last year, there are no major magazines focused on Modula-2. However, a relatively new publication named Modules & Definitions is devoted exclusively to Modula-2. It is a shareware magazine that can be downloaded from CompuServe and BIX. Readers are expected to pay $9.95 annually; a paper subscription is available for $19.95.


Any report on the status of Modula-2 would be incomplete without a discussion of Oberon and Modula-3, which have lately begun to receive as much attention as Modula-2 itself. (In fact, the theme of the Second international Modula-2 Conference is "Modula-2 and Beyond," with an emphasis on Oberon and Modula-3.)

Oberon, another Wirth-designed language, simultaneously simplifies Modula-2 (by dropping variant records, opaque types, enumeration types, subrange types, and the FOR statement, among other features) and adds extensions for object-oriented programming. In typical Wirth fashion, the added features (principally "type extension") are simpler than the OOP extensions of Turbo Pascal and similar languages.

Incidentally, the name "Oberon" refers not only to the language, but also to the operating system developed for Wirth's own Ceres workstations. The Oberon operating system, like the Oberon language, is designed to offer state-of-the art functionality without complexity.

Getting information on Oberon used to require a trip to the local college library to obtain journal articles. The first book on Oberon recently appeared, however. The Oberon System: User Guide and Programmer's Manual was written by Martin Reiser, who worked with Wirth on the Oberon system. Raiser's book clears up at least one mystery surrounding Oberon -- the origin of the language's name. According to Reiser, "the project was whimsically christened Oberon by Wirth who was fascinated by the accuracy and reliability of the space probe Voyager which passed the moon Oberon of planet Uranus at the time of conception of the new project."

Reiser's book describes the Oberon system -- user interface, editor, compiler, file system, and so forth -- from both the user's and the application programmer's viewpoints. Reiser doesn't cover the Oberon language, however. That task is left to a forthcoming book (coauthored by Wirth) titled Programming in Oberon: Steps beyond Pascal and Modula. Unfortunately, this book won't be available until mid-1992. For a discussion of design issues faced by the Oberon team, we'll have to wait for The Oberon Project, a 1993 book by Wirth and Jurg Gutknecht, his collaborator on the Oberon project. Both books will be published by Addison-Wesley in conjunction with the ACM Press.

Public-domain versions of the Oberon system are available for the Macintosh and for Sun Sparcstations via anonymous FTP from ( For more information about Oberon, see "Oberon" by Dick Pountain in Byte, March 1991.

Incidentally, Wirth isn't resting on his laurels; rumor has it that he's already at work on Oberon-2.


Modula-3 was designed jointly by groups at DEC's Systems Research Center and the (now defunct) Olivetti Research Center in an attempt to create a language safer, yet more powerful than Modula-2. Modula-3 has a different type system than Modula-2 and provides improved safety from runtime errors. It also adds several new features, including garbage collection, exception handling, threads (lightweight processes), and support for object-oriented programming.

The design of Modula-3 began in 1986; the first description of the language was published in 1988. Since then, the language has continued to evolve. After one final set of changes last winter (during which a generic facility was added), the language was finalized.

The first book on Modula-3 is Systems Programming in Modula-3, a collection of papers -- including the official language report -- written by the people who designed and implemented the language. A second book, Programming in Modula-3, is due out later this year. The author is Sam Harbison, who wrote about Modula-3 in the November 1990 issue of Byte (and who, oddly enough, is coauthor of the best-selling C: A Reference Manual). Programming in Modula-3 will be the first complete tutorial and reference for the language. Both books are published by Prentice-Hall.

If you're interested in Modula-3, write to DEC's Systems Research Center and ask for Research Reports 52 and 53. Contact Harbison's company, Pine Creek Software, to receive a free Modula-3 newsletter. If you have access to Usenet, check out the comp.lang.modula3 newsgroup.

A Modula-3 compiler for Unix is available by anonymous FTP from (; the directory is /pub/DEC/Modula-3.

Modula-2 Resource Guide


The Oberon System: User Guide and
Programmer's Manual
Martin Reiser
Wokingham, England:
Addison-Wesley, 1991; $37.75
ISBN 0-201-54422-9

Draft for Moudula-2 Standard

IEEE Computer Society
Standards Office
1730 Massachusetts Avenue NW
Washington, DC 20036

Modula-2 User Groups and Publications

P.O. Box 51778
Palo Alto, CA 94303-0721
Membership: $25 annually

P.O. Box 1148
La Jolla, CA 92038
Membership: $45 annually

Modules & Definitions
P.O. Box 7549
York, PA 17404

Modula-2 Compilers

Jensen & Partners International
1101 San Antonio Road, Suite 301
Mountain View,
CA 94043

Metrowerks Inc.

The Trimex Building, Route 11
Mooers, NY 12958

MultiScope Inc. 1235 Pear Ave.

Mountain View, CA 94043

Real Time Associates Ltd.

Canning House, 59 Canning Road
Croydon, Surrey CRO 6QF
United Kingdom
44(0)81-656-7333 (voice)
44(0)81-655-0410 (fax)

Stony Brook Software
187 E. Wilbur Road, Suite 9
Thousand Oaks, CA 91360

Modula-2 Conferences

Modula-2 Conference
Centre for Extension Studies
Loughborough University of
Loughborough, Leicestershire
LE11 3TU
United Kingdom
44(0)509-222174 (voice)
44(0)509-610813 (fax)


Digital Equipment Corporation
Systems Research Center
130 Lytton Avenue
Palo Alto, CA 94301

Pine Creek Software
305 South Craig Street, Suite 300
Pittsburg, PA 15213
412-681-9811 (voice and fax)

Systems Programming in Modula-3
Greg Nelson (editor)
Englewood Cliffs, N.J.: Prentice Hall,
1991: $25.00
ISBN 0-13-590464-1

Copyright © 1991, Dr. Dobb's Journal

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.