Talk:CLU (programming language)

= Absurd? =

CLU and Alphard both seem to get as close as possible to being a full OO language without actually being one.

What is that supposed to mean? It's like say the Mideterranean Sea is as close to being an ocean as any body of water that isn't an ocean, could possibly be. In other words, nonsense :-) Wouter Lievens 23:31, 12 February 2006 (UTC)

The Object Oriented language SIMULA (see wikipedia) predates CLU by 8 years. 67.83.67.25 10:40, 10 December 2006 (UTC)
 * So what? The statement says nothing about time priority. -- 98.108.206.178 (talk) 09:40, 29 March 2011 (UTC)


 * It's not nonsense; I learned and used it in 1979, when I was also learning LISP which was getting OO then (e.g. Lisp Machine Flavors), and the statement highlighted by Wouter Lievens is the best one sentence description of the language I've ever heard. Hga 14:24, 4 October 2007 (UTC)
 * It's not a description at all, and it's simply false -- there are a number of features that could be added to CLU, such as a module system, overloading, generics/templates, and private members while still leaving it shy of "full". -- 98.108.206.178 (talk) 09:40, 29 March 2011 (UTC)

= Enumerated Types =

The article says "Oddly, given the focus on type design, CLU does not offer enumerated types, nor any obvious way to create them." I would take some issue with that; CLU had a more powerful pair of features, oneof and variants, that subsumes the capabilities of enumerated types. A oneof type allows you to define a disjoint set of tags, just like a variant, and, in addition, the type of the "remainder" of the oneof for each tag. In C terms, it's the combination of an enumeration definition the choices, and struct OneOf { TheEnum tag; union {  }. To simulate a simple enumeration type, you would just make the type of each tag be null.

As the article notes in its section on influences, many CLU features have now made it into mainstream langauges. If I were writing the article, I would also call out one feature that has not been adopted in the same way, but which I believe someday might: the strong distinction between mutable and immutable types. There are mutable records and immutable structs, mutable variants and immutable oneofs, mutable arrays and immutable sequences. Calling out and enforcing these distinctions in the type system really made one think about mutability, which is a useful discipline to encourage.

DavidDetlefs 19:57, 23 September 2007 (UTC)

= Typos in code example? = There appear to be a pair of missing underscores in the code example showing the definition of a complex_number type. Specifically, "complex number" at the beginning (where there is an "end complex_number" at the end) and "real part : real" (which is followed by "imag_part : real"). I don't know the language, and so don't feel comfortable changing the example myself. 134.173.58.19 01:00, 2 December 2007 (UTC)