Doing it better 1999-05-27 d ### From Reuben > How might it be defined more tightly? What is a context model? I think inheritance is tighter than a sum: when you inherit from Integer and String you don't have an Integer or a String, but a new type, with well-defined properties (it might come out as either a union or a sum type). I'd just rather think directly in OOP terms than set-theoretic ones. Context is an alternative to OOP that makes relationships first-class, rather than being built into the inheritance tree. OOP is a special case, and many things, e.g. numbers, are nicer, because you don't have the x.plus(y) | y.plus(x) assymetry that you have with OOP, where plus has to be a method of float. Of course, in C++ or Java you solve this problem with polymorphism, but context gives you this for free without needing an extra mechanism. I suppose context is essentially inheritance by program scope (can be lexical or dynamic) rather than statically with the data types. Needless to say, context is the way my OOP mini-Forth works. -- http://www.cl.cam.ac.uk/users/rrt1001/ | certain, a. insufficiently analysed