Modula-3

It has been influential in research circles (influencing the designs of languages such as Java, C#, Python[8] and Nim), but it has not been adopted widely in industry.

It was designed by Luca Cardelli, James Donahue, Lucille Glassman, Mick Jordan (before at the Olivetti Software Technology Laboratory), Bill Kalsow and Greg Nelson at the Digital Equipment Corporation (DEC) Systems Research Center (SRC) and the Olivetti Research Center (ORC) in the late 1980s.

Modula-3's main features are modularity, simplicity and safety while preserving the power of a systems-programming language.

Modula-3 aimed to continue the Pascal tradition of type safety, while introducing new constructs for practical real-world programming.

The Modula-3 project started in November 1986 when Maurice Wilkes wrote to Niklaus Wirth with some ideas for a new version of Modula.

Wilkes had been working at DEC just prior to this point, and had returned to England and joined Olivetti's Research Strategy Board.

Wirth had already moved on to Oberon, but had no problems with Wilkes's team continuing development under the Modula name.

In any case, in spite of Modula-3's simplicity and power, it appears that there was little demand for a procedural compiled language with restricted implementation of object-oriented programming.

For a time, a commercial compiler named CM3 maintained by one of the chief implementors prior at DEC SRC who was hired before DEC being sold to Compaq, an integrated development environment (IDE) named Reactor and an extensible Java virtual machine (licensed in binary code and source code formats and buildable with Reactor) were offered by Critical Mass, Inc., but that company ceased active operations in 2000 and gave some of the source code of its products to elego Software Solutions GmbH.

In March 2002, elego also took over the repository of another active Modula-3 distribution, PM3, until then maintained at the École Polytechnique de Montréal but which later continued by the work on HM3 improved over the years later until it was obsoleted.

In the event of a name collision between an imported module and other entity within the module, the reserved word AS can be used as in IMPORT CollidingModule AS X; Some ability is deemed unsafe, where the compiler can no longer guarantee that results will be consistent; for example, when interfacing to the C language.

The keyword UNSAFE prefixed in front of INTERFACE or MODULE, may be used to tell the compiler to enable certain low level features of the language.

For example, an unsafe operation is bypassing the type system using LOOPHOLE to copy the bits of an integer into a floating point REAL number.

Thus (like C++ templates) one can easily define and use abstract data types, but unlike C++, the granularity is at the module level.

To create a new Person.T object, use the built in procedure NEW with the method init() as Modula-3's REVEAL construct provides a conceptually simple and clean yet very powerful mechanism for hiding implementation details from clients, with arbitrarily many levels of friendliness.

For example, in the input/output (I/O) section of the library libm3, readers and writers (Rd.T, and Wr.T) are derived from MUTEX, and they lock themselves before accessing or modifying any internal data such as buffers.

These topics are: structural vs. name equivalence, subtyping rules, generic modules, and parameter modes like READONLY.

The object-oriented design of the Rd (readers) and Wr (writers) libraries is covered in detail in the book by Greg Nelson.

This was done under the auspices of the Larch/Modula-3 (see Larch family)[12] and Extended static checking[13] projects at DEC Systems Research Center.

Software which is programmed with Modula-3 includes: Although Modula-3 did not gain mainstream status, several parts of the DEC-SRC M3 distribution did.

Only when Sun moved from the Common Object Request Broker Architecture (CORBA) standard to the IIOP based protocol was it dropped.