Tuesday | 2 December, 2008
The A-Z of Programming Languages: Modula-3
Luca Cardelli on why Modula-3 played a major role in popularizing the notion of type-safe programming and why Modula-3 is still vastly superior to programs such as Java.
Naomi Hamilton 15/07/2008 21:38:32

What is the most interesting program that you've seen written with Modula-3?

I'll just talk about my programs. I wrote the second program (after Next Computer's) direct-manipulation user interface editor. And I wrote the Obliq distributed programming language, which was heavily based on Modula-3's network objects.

Have you ever seen the language used in a way that was not originally intended? If so, what was it? And did it or didn't it work?

Not really; we intended to support type-safe systems programming and that is what happened. It's possible that we missed some opportunities, however.

Why do you think that the language hasn't been widely adopted by industry, but is still influential in research circles?

Basically, competition from Java. Java had all the same main features (objects, type safety, exceptions, threads), all of which also came from the same tradition (and I believe they read our tech reports carefully...). In addition, Java initially had innovations in bytecode verification and Web applets, and later had the full support of a large company, while we were only supporting Modula-3 form a research lab. I believe the module system in Modula-3 is still vastly superior to programs such as Java, and that may explain continued interest.

Do you still use Modula-3 today? Is the language still being contributed to and updated?

While Modula-3 was my all-time favorite language, I stopped using it after leaving DEC. I used Java for a short period, and today I occasionally use C# and F#.

How do you feel about statements such as this in Wikipedia: "Modula-3 is now taught in universities only in comparative programming language courses, and its textbooks are out of print"?

It's probably accurate!

According to Wikipedia, the Modula-3 "standard libraries [were] formally verified not to contain various types of bugs, including locking bugs." Why was this?

Type safety gets rid of a lot of silly bugs, but the main class of bugs it does not prevent are concurrency bugs. The expectation for Modula-3 libraries was that they would have a complete description (in English), of exactly what each procedure did and what it required. There was social pressure at the time to make these descriptions very precise. Some were so precise that they were amenable to formal verification. This was considered important for some base libraries, particularly in terms of locking behavior, because locking bugs were not captured by the type system, and were the hardest to debug.

Computerworld Buyer's Guide - Vendors Matched to this Article
Luca Cardelli
Luca Cardelli
Computerworld Buyer's Guide - Vendors Matched to this Article
Additional Resources
Executive Guides
Whitepapers
Zones
Zone logoZones provide focussed content from Computerworld and leading technology partners.
Newsletter Subscription
Sign up for our Computerworld newsletters!
RSS Feeds

Comments

Annotations to the interview

Just a pair of comments:
The open source release of cm3 (Critical Mass Modula-3) development environment since 2000 and more recently of the web browser-based Integrated Development Environment called CM3-IDE gives an amount of support to several platforms (SPARC, x86, x86_64, PowerPC on Gnu/Linux, Windows, BSD, Mac and Solaris platforms) and have been recently contributed (updated) a threading implementation, a new 64 bit native language primitive type and a new garbage collection technique, the graphic libraries built on top of X11 server and Windows windowing systems, the gcc-4.3 based back end (available for almost all platforms) besides setting an automatic regression test framework for daily revising of the development environment. Also a gdb-6.4 extension based debugger, m3gdb.
About huge projects of Modula-3 there are several ranging from a life-critical 911 emergency call system, an extensible operating system, Spin, a commercial Java Virtual Machine, Critical Mass JVM, web servers including one for web development, hm3, animation systems built on top of Modula-3 and Obliq for augmented reality, Coterie, and for teaching purposes, Zeus and a so called Digital Desktop paradox environment. Also a Concurrent Versions System, with server/client platform highly efficient used for source code downloading on the BSD operating systems and in some GNU/Linux software, Cvsup. Also a functional programming language environment, with concurrency, exceptions and more, UFO . Besides compilers, cm3 (almost the entire integrated development environment is implemented in top of Modula-3), m2tom3, a debugger, ldb, and a constraint based graphic editor, Juno-2, and literate programming tools, as m3noweb and M3doc. And an on-line reading application with an editor and postscript to reading format converter, virtual paper. Also is used on embedded systems, in network interface cards, SPINE, on PDA, PARCTAB. Also a structured-oriented database management system (used on a persistent extension of Modula-3, Persistent Modula-3), a Graph Grammar Programming Environment, Progres.
The base libraries were formal revised with an Extended Static Checker, ESC/Modula-3 implemented also in Modula-3 (then ESC/Java) as a research project in prior Digital Equipment Corporation Systems Research Center, then Compaq Systems Research Center, now property of Hewlett Packard; specially the the Readers/Writers library, looking for index out of bound errors, nil dereferences, race conditions and deadlocks, using an automatic theorem prover also built on Modula-3, Simplify; all checking annotated source code in the presence of information hiding and data abstraction.
Also there is an upcoming Eclipse plug-in for the language, m3clipse.
For being more fair with the teachers, the language is a reference for it's use of the concurrency; is a handout in the Principles of Computer Systems course of MIT, also in Operating Systems courses in other Universities of Germany and Colombia. Also as a language for the course of Object Oriented Programming in Wichita State University.
The integrated development environment is freely available from:
Open Critical Mass Modula-3

Market Place

 

Smart SOA World Tour

Discover how SOA can create smarter outcomes for your business.

Attend and learn:

  • How SOA is helping leading companies to become more agile
  • Where you should be applying SOA processes in your company
  • The top SOA implementation mistakes to avoid

Click here for more information.
Whitepaper

Still Sneaking In: The Threats Your Security Tools Aren't Telling You About

Web 2.0 applications are all the rage, offering us tremendous value when it comes to collaboration and communication. They also open us up to new kinds of attacks however, and can cause problems in keeping systems and data secure. Read on to learn about the new attack methods and how you can defend yourself and your business.

Enterprise IT Buyer's Guide
Find Technology Vendors Fast
 
Find vendors by name | Find by category
Sponsored Links