Modula-2 (source code)

= Modula-2
{c}

<Modula-2> is a systems <programming language> designed by <Niklaus Wirth>, combining structured programming with explicit <software modules> and facilities for low-level system construction. A <definition module> declares an exported interface; an <implementation module> supplies its implementation and private details. Clients import the declared names instead of depending on every declaration in the implementation.

For example, a <stack> module can export a <stack> type and push/pop procedures while keeping the <array> or linked representation private. This permits separate <compilation> against an interface and replacement of the implementation when its contract is preserved. Wirth's project account places Modula-2 in the Lilith workstation effort and records completion of its first <compiler> at ETH in1979.<Summary of projects 1962-1999 by Niklaus Wirth>[Modula-2 and Lilith sections]{ref} Low-level facilities make hardware-oriented programs expressible, but also require care about the assumptions connecting language operations to devices and machine representations.