Preprint: "Cecil is Post-Object" 
Author Message
 Preprint: "Cecil is Post-Object"

A couple of my colleagues have just finished a new paper in which they
argue that the future of programming langauges lies beyond current
object-oriented langauges. Their argument works as follows.

The "basic level" is a concept from cognitive psychology. The basic
level includes the most important classes in a class hierarchy. The
basic level is usually in the middle of the hierarchy. For example,
"dog" and "tuna" are basic level categories.

Classes below the basic level have essentially the same "functional"
properties as the basic level, but become increasingly specific. Thus,
"dalmation" is a kind of dog and "three year old chihuahua with a
limp" is a more specific kind of dog.

Classes above the basic level tend to be conceptual. Thus, "carnivore"
is more general than dog. And "animal" combines "tuna" and "dog" into
an even more general category, even though tunas and dogs share almost
no properties. One eats squid, the other eats Purina. One swims, the
other walks. To combine dogs and tunas into one category requires a
leap of imagination. In "Women, Fire, and Dangerous Things," Lakoff
describes the work of Brown, Rosch, and others on basic level
categories.

* Anyway, my friends argue that below the basic level, class
relationships are top-down. Classes group objects that are
functionally equivalent. One instance can work as a prototype for
another instance. Instances can be checked for type correctness at
compile time and contravariance works.

Above the basic level, class relationships are bottom-up. Classes
groups objects that are "conceptually" similar. One instance cannot
work as a prototype for another. Instances can only be checked for
type correctness at runtime, and covariance works.

The basic level can be raised or lowered, but it marks the level in
the class hierarchy where we want to stop ensuring compile-time type
correctness and switch to runtime type correctness.

This difference between runtime and compile-time comes up all the time
in comp.object, most recently with the "trees" example. However, it
occurs in compilers, databases, user interfaces and almost everywhere
else in programming.

There are many well-known techniques for dealing with class
relationships below the basic level. But, class relationships above
the basic level are not well-understood. They can be implemented using
variant records, typeid, typecases, and multimethods. However,
multimethods is the safest and most effective tool. The Mediator
pattern, the Visitor pattern, and double dispatch are often used as
work arounds for multimethods.

* Anyway, my friends argue that languages that provide strong type
checking both above and below the basic level are "post-object"
languages. And, they conclude that Cecil is the first language to
qualify as "post-object."

They call Cecil a post-object language because current
"object-oriented" languages tend to deal with classes one side of the
basic level, or the other. Strongly typed languages, such as C++ and
Eiffel work most effectively with class relationships below the basic
level. Weakly typed languages, such as CLOS and Smalltalk work most
effectively for class relationships above the basic level. We know of
no languages that strive to provide strong compile-time and runtime
type checking except for Cecil, Kea, and Polyglot. But as far as we
know, Cecil is the only working language.

I can arrange to mail you a copy of their two papers on this subject
(by U.S. Post), if you send me your address.

-- Michael Wing



Wed, 27 Jan 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

2. "Destructors" and dynamic pre/post-conditions

3. : script CGI - clipper 5.2 - Method="POST"

4. "BIG E vs little e", was pre-condition vs post-condition

5. help: cgi "post" problem (client side)

6. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

7. Parsing ""D""?

8. "Fifth", "Forth", zai nar?

9. Ruby "finalize", "__del__"

10. beginners "let"/"random" question

11. ANNOUNCE: new "plus"- and "dash"-patches available for Tcl7.5a2/Tk4.1a2

12. Looking for "stdin", "stdout"

 

 
Powered by phpBB® Forum Software