Category:CLU

From Rosetta Code
Language
CLU
This programming language may be used to instruct a computer to perform a task.
Execution method: Compiled (machine code)
Garbage collected: Yes
Parameter passing methods: By value
Type safety: Safe
Type strength: Strong
Type compatibility: Structural
Type expression: Explicit
Type checking: Static
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using CLU.


CLU is a programming language developed in the 1970s at MIT by professor Barbara Liskov. It pioneered many features that are common in programming languages today.

CLU was the first language to support iterators (using the yield statement), abstract data types, parameterized types, and type-safe unions. It was also one of the first to support structured exception handling. CLU also supports *clusters*, for which it is named, and which are only one step removed from modern object-oriented classes, lacking only inheritance and instance methods. All objects live on the heap, are automatically garbage-collected, and are accessed by reference, as in Java.

Furthermore, CLU allows every operator and special form to be overloaded. All of them are just syntactic sugar for type methods, e.g. x + y is the same as T$add(x, y) (where T is the type of x), and will work as long as the T cluster contains an appropriate add method. CLU takes this much further than most modern languages: even an expression like foo.bar := baz is really just a setter underneath, and is exactly equivalent to T$set_bar(foo, baz) (where, again, T is the type of foo).

CLU has left its mark on many modern programming languages. C++ templates and Java and C# generics were based on CLU's parameterized types. Java's garbage-collected object model is pretty much the same as CLU's, and its exception handling also strongly resembles CLU. Python, on top of the garbage-collected objects and the exceptions, also borrowed the yield statement and the overloading mechanism.

Subcategories

This category has only the following subcategory.

Pages in category "CLU"

The following 200 pages are in this category, out of 238 total.

(previous page) (next page)
(previous page) (next page)