Path: utzoo!attcan!uunet!image.soe.clarkson.edu!news From: cline@sun.soe.clarkson.edu (Marshall Cline) Newsgroups: comp.object Subject: OO Languages with "constraints" (Was: Subclassing vs. subtyping) Message-ID: Date: 14 Oct 89 22:21:07 GMT References: <33009@cornell.UUCP> <18129@pasteur.Berkeley.EDU> Sender: news@sun.soe.clarkson.edu Reply-To: cline@sun.soe.clarkson.edu (Marshall Cline) Distribution: comp Organization: Clarkson University, Potsdam NY Lines: 35 In-reply-to: hws@icsib1.Berkeley.EDU's message of 9 Oct 89 20:24:14 GMT In article <18129@pasteur.Berkeley.EDU> hws@icsib1.Berkeley.EDU (Heinz Schmidt) writes: >I believe at the heart of OO programming is the understanding that >instance variables, in general, are *not* independent. In general >a method will operate on a couple of variables. ... Ok. So you're saying there (typically) is redundant information in a class. The key then is that the "methods" keep this redundant information coherent ("self consistent"?). >... In the above setting you might say, a SQUARE >is a rectangle with the constraint > HEIGHT=WIDTH >(some OO languages allow to express such constraints).... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What languages? What you seem to be saying is: The self-consistency of the redundant information in a class can be formally specified in "some OO languages." But one of the cries at OOPSLA'89 was the need to support this kind of semantic information in our OO Languages. No one said "Language X does a great job at this kind of thing," so I wonder which languages you're refering to. Actually this point is more than just idle chatter to me. Indeed this very question is at the heart of current research I'm doing with Doug Lea (dl@oswego.oswego.edu). I appreciate the pointers. Marshall -- __________________________________________________________________ Marshall P. Cline Internet: cline@sun.soe.clarkson.edu 225 Clarkson Hall Alternate:bh0w@clutx.clarkson.edu ECE dept Usenet: uunet!sun.soe.clarkson.edu!cline Clarkson University Bitnet: BH0W@CLUTX Potsdam, NY 13676 AT&T: 315-268-3868