Paradigm | multi-paradigm: object-oriented, procedural |
---|---|
Designed by | Barbara Liskov and her students |
Developer | Massachusetts Institute of Technology |
First appeared | 1975 |
Stable release | |
Typing discipline | strong |
Website | www |
Major implementations | |
Native CLU, Portable CLU, clu2c | |
Influenced by | |
ALGOL 60, Lisp, Simula | |
Influenced | |
Ada, Argus, C++, Lua, Ruby, Sather, Swift |
Portable CLU / November 6, 2009
CLU is a pioneering programming language created at the Massachusetts Institute of Technology (MIT) by Barbara Liskov and her students between 1974 and 1975. While it did not find extensive use, it introduced many features that are used widely now, and is seen as a step in the development of object-oriented programming (OOP). However, it is not object-oriented, instead being considered an object-based language, as it lacked many features of OOP.
Key contributions include abstract data types,call-by-sharing, iterators, multiple return values (a form of parallel assignment), type-safe parameterized types, and type-safe variant types. It is also notable for its use of classes with constructors and methods, but without inheritance.
The syntax of CLU was based on ALGOL, then the starting point for most new language designs. The key addition was the concept of a cluster, CLU's type extension system and the root of the language's name (CLUster). Clusters correspond generally to the concept of a "class" in an OO language, and have similar syntax. For instance, here is the CLU syntax for a cluster that implements complex numbers:
A cluster is a module that encapsulates all of its components except for those explicitly named in the "is" clause. These correspond to the public components of a class in recent OO languages. A cluster also defines a type that can be named outside the cluster (in this case, "complex_number"), but its representation type (rep) is hidden from external clients.