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)
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 { <one union elem for each enum elem> }. 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.