Category: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: |
|
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.
Pages in category "CLU"
The following 39 pages are in this category, out of 245 total.
(previous page) (next page)S
- Strange plus numbers
- Strip a set of characters from a string
- Subleq
- Sudan function
- Sum and product of an array
- Sum data type
- Sum digits of an integer
- Sum of a series
- Sum of divisors
- Sum of first n cubes
- Sum of square and cube digits of an integer are primes
- Sum of squares
- Sum of the digits of n is substring of n
- Summarize and say sequence
- Summation of primes
- System time