home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!usc!ucla-cs!ucla-mic!unixg.ubc.ca!kakwa.ucs.ualberta.ca!acs.ucalgary.ca!jabraham
- From: jabraham@acs.ucalgary.ca (John Abraham)
- Subject: Object Relations - was: Re: Object hidden state and side effects
- Message-ID: <92Dec16.182308.20249@acs.ucalgary.ca>
- Sender: John Abraham
- Date: Wed, 16 Dec 92 18:23:08 GMT
- References: <1992Dec13.152136.16852@hasler.ascom.ch> <1992Dec14.112222.13987@kei.is.s.u-tokyo.ac.jp> <1992Dec15.014420.6604@midway.uchicago.edu>
- Nntp-Posting-Host: acs6.acs.ucalgary.ca
- Organization: The University of Calgary, Alberta
- Lines: 34
-
- In article <1992Dec15.014420.6604@midway.uchicago.edu> dave@alex.uchicago.edu (Dave Griffith) writes:
- >
- >A more extreme example, and one that I'm working on in my language, is
- >inter-object relationships. There is no _direct_ way in current object-oriented
- >languages to say "object A stands in relation B to object C". There are
- >any number of _indirect_ ways of saying this. A may be an instance variable
- >of C, C may be an instance variable of A, the pair (A, C) may be in some
- >dictionary B, etc. ad infinitum. Things get even more complex if relations of
- >arity other than two are allowed, if relations may be many-to-many, if
- >constraints on relations hold. All of these may be modelled by current
- >languages, but none has direct support for the concept "relation". As such,
-
- RIGHT ON! This is a very big problem. When I'm doing OO design,
- I end up with all these objects, and they all have relationships
- with each other. The most commen are the ISA relationship
- (class-superclass-subclass) and the aggregation relationship (car
- is an aggregation of 4 wheels, a body, a steering wheel, etc.),
- both of which can be implemented reasonably easily. BUT all the
- other relationships are nightmares when it comes to
- implementation. Especially secondary relationships like the
- relationship between the Road and the 4 wheels (which are part of
- the car.). Can anyone give me pointers on some standard way of
- dealing with this?
-
- --
- John E. Abraham
- jabraham@acs.ucalgary.ca
- Mathematical Modelling-Computer Simulation
- Transportation and Land Use Interaction
- University of Calgary
- Department of Civil Engineering
- 2500 University Drive N.W.
- Calgary, AB, T2N 1N4
- Canada
-