home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.ada:3216 comp.object:4155
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!root44!hrc63!mrcu!paj
- From: paj@uk.co.gec-mrc (Paul Johnson)
- Newsgroups: comp.lang.ada,comp.object
- Subject: Re: OOD, Ada, and Inheritance
- Message-ID: <2169@snap>
- Date: 6 Nov 92 09:00:41 GMT
- References: <mmaccorm.47@fox.nstn.ns.ca>
- Reply-To: paj@uk.co.gec-mrc (Paul Johnson)
- Organization: GEC-Marconi Research Centre, Great Baddow, UK
- Lines: 26
-
- In article <mmaccorm.47@fox.nstn.ns.ca> mmaccorm@fox.nstn.ns.ca (Mike Mac Cormack) writes:
- >If Ada software is being designed using OOA and OOD, should inheritance be
- >avoided (or prohibited) in the design process, as Ada does not provide
- >inheritance?
-
- Good question. If no-one has any other questions then class is
- dismissed :-)
-
- I recall that ADA's genericity system allows you to pass functions and
- procedures as parameters in a way reminiscent of the C function
- pointers (although ADA is type-safe). I would look into the
- possibility of simulating inheritance by setting up structures of
- functions when objects are created. You should be able to get single
- inheritance without too much trouble. Maybe an ADA guru can suggest
- some details.
-
- One system built in this way is the X Intrinsics library (Xt). Its
- built in C, but the principle remains the same. Take a look at it for
- an idea of what I mean.
-
- Paul.
- --
- Paul Johnson (paj@gec-mrc.co.uk). | Tel: +44 245 73331 ext 3245
- --------------------------------------------+----------------------------------
- These ideas and others like them can be had | GEC-Marconi Research is not
- for $0.02 each from any reputable idealist. | responsible for my opinions
-