![]() |
![]()
Custom Search
|
Computer History
|
|||||||||||
|
Other featuresAnother 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. 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. ResourcesHistory of Programming Languages Source: http://en.wikipedia.org/wiki/CLU_programming_language |