CLU (programming Language) - Other Features

Other Features

Another key feature of the CLU type system are iterators, which return objects from a collection one after the other. Iterators were "black boxes" that offered an identical API no matter what data they were being used with. Thus the iterator for a collection of complex_numbers would be identical to that for an array of integers. Iterators are now a common feature of most modern languages(See Iterator).

CLU also includes exception handling, based on various attempts in other languages; exceptions are raised using signal and handled with except. Oddly, given the focus on type design, CLU does not offer enumerated types, nor any obvious way to create them.

A final distinctive feature in CLU is multiple assignment, where more than one variable can appear on the left hand side of an assignment operator. For instance, writing x,y = y,x would exchange values of x and y. In the same way, functions could return several values, like x,y,z = f(t).

All objects in a CLU program live in the heap, and memory management is automatic.

Read more about this topic:  CLU (programming Language)

Famous quotes containing the word features:

    However much we may differ in the choice of the measures which should guide the administration of the government, there can be but little doubt in the minds of those who are really friendly to the republican features of our system that one of its most important securities consists in the separation of the legislative and executive powers at the same time that each is acknowledged to be supreme, in the will of the people constitutionally expressed.
    Andrew Jackson (1767–1845)

    Each reader discovers for himself that, with respect to the simpler features of nature, succeeding poets have done little else than copy his similes.
    Henry David Thoreau (1817–1862)