comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nickroberts@adaos.worldonline.co.uk>
Subject: Re: List Container Straw Man
Date: Thu, 8 Nov 2001 19:09:37 -0000
Date: 2001-11-08T19:09:37+00:00	[thread overview]
Message-ID: <9seup4$12h0ar$3@ID-25716.news.dfncis.de> (raw)
In-Reply-To: 9sdnva$dpk$1@news.huji.ac.il

"Ehud Lamm" <mslamm@mscc.huji.ac.il> wrote in message
news:9sdnva$dpk$1@news.huji.ac.il...
> ...
> Am I right in _comparing_ (not equating) your approach to having an
ancestor
> type like Object or ANY, that all element types are derived from - thus
> ensuring a common interface?

Not really. My approach (as Ted's) uses generic packages instantiated with
the element type. I use a hierarchy of tagged types to represent iterators
(of gradually increasing complexity) based on that element type: it is this
which ensures a common (iterator) interface.

Typeless (nominally typeless), and 'reflective', languages, such as
Smalltalk, can get away with having containers based on a single root
element class, because the containers are always able to adapt sufficient to
cope with any element object thrown at them. Ada is not like this.

As regards my proposal, the element type must be definite. However, nothing
stops it being an access-to-classwide type:

   type Object_Ref is access all Object'Class;

allowing stores to deal, indirectly, with objects of all sorts whose types
are derived from Object.






  reply	other threads:[~2001-11-08 19:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-06 16:45 List Container Straw Man Nick Roberts
2001-11-06 17:29 ` Stephen Leake
2001-11-06 18:25   ` Marin David Condic
2001-11-06 23:02     ` Nick Roberts
2001-11-07 19:49       ` Stephen Leake
2001-11-07 20:30         ` Marin David Condic
2001-11-07 23:58           ` Nick Roberts
2001-11-08  4:34             ` Jeffrey Carter
2001-11-08 10:45             ` Ehud Lamm
2001-11-08 19:09               ` Nick Roberts [this message]
2001-11-09 16:32                 ` Ted Dennison
2001-11-10  2:20                   ` Nick Roberts
2001-11-10 19:50                     ` Ehud Lamm
2001-11-11  3:48                       ` Nick Roberts
2001-11-08 10:41           ` Ehud Lamm
2001-11-08 19:20             ` Marin David Condic
2001-11-08 20:35               ` Ehud Lamm
2001-11-09 16:39             ` Ted Dennison
2001-11-08  0:06         ` Nick Roberts
2001-11-09 16:16           ` Stephen Leake
2001-11-09 16:24             ` Ehud Lamm
2001-11-09 16:52               ` Brian Rogoff
2001-11-09 18:04             ` Darren New
2001-11-09 20:05               ` Stephen Leake
2001-11-10  3:24             ` Nick Roberts
2001-11-06 23:52   ` Nick Roberts
2001-11-07  4:44     ` A question and a request Eric Merritt
2001-11-07 11:00       ` Preben Randhol
2001-11-07 12:54         ` David C. Hoos, Sr.
2001-11-08  2:35           ` dale
2001-11-07 13:24         ` Eric Merritt
2001-11-07 13:58       ` James Rogers
2001-11-07 16:32       ` Jeffrey Carter
2001-11-09 23:32       ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox