Science Fair Projects Ideas - CLU programming language

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

CLU programming language

CLU is a programming language created at MIT by Barbara Liskov and her students between 1974 and 1975. It was notable for its use of constructors for abstract data types that included the code that operated on them, a key step in the direction of object oriented programming (OOP). However many of the other features of OOP are missing or incomplete, notably inheritance, and the language is also hindered by a sometimes frustratingly terrible syntax. CLU and Alphard both seem to get as close as possible to being a full OO language without actually being one. Ruby borrowed many concepts from CLU and has similar syntax.

The syntax of CLU was based on ALGOL, then the starting point for most new language design. The key addition was the concept of a cluster, CLU's type extension system and the root of the language's name (CLUster). Clusters correspond generally to the concept of an "object" in an OO language, and have roughly the same syntax. For instance, here is the CLU syntax for a complex number cluster:

    complex_number = cluster is add, subtract, multiply, ....
         rep = record [ real_part: real, imag_part: real ]
         add = proc ... end add;
         subtract = proc ... end subtract;
         multiply = proc ... end multiply;
         ...
    end complex_number;

While clusters offered a then-advanced system for structuring programs, CLU did not offer any sort of structure for the clusters themselves. Cluster names were global, and no namspace mechanism was provided to group clusters or allow them to be created "locally" inside other clusters. This problem is hardly unique to CLU, but it is surprising that so many languages have lacked this feature given that the "whole idea" of ALGOL was to offer scope to variables, it seems that cluster/object names should be an obvious extension of this concept.

There are no implicit type conversions. In a cluster, the explicit type conversions 'up' and 'down' change between the abstract type and the representation. There is a universal type 'any', and a procedure force[] to check that an object is a certain type. Objects may be mutable or immutable, the later being "base types" such as integers.

Another key feature of the CLU type system is 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, 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.

Exceptions were another basic feature of CLU, largely copied from various attempts to add this feature in other languages. Exceptions are raised using signal and handled with except.

One of features of CLU was multiple assignment: e.g. 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). Oddly, given the focus on type design, CLU did not offer enumerated types, nor any obvious way to make them.

External links

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice