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_number
s would be identical to that for an array of integer
s. 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:
“It is a tribute to the peculiar horror of contemporary life that it makes the worst features of earlier timesthe stupefaction of the masses, the obsessed and driven lives of the bourgeoisieseem attractive by comparison.”
—Christopher Lasch (b. 1932)
“These, then, will be some of the features of democracy ... it will be, in all likelihood, an agreeable, lawless, particolored commonwealth, dealing with all alike on a footing of equality, whether they be really equal or not.”
—Plato (c. 427347 B.C.)