comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Problem with Booch iterators
Date: 13 Nov 2002 11:39:23 -0800
Date: 2002-11-13T19:39:24+00:00	[thread overview]
Message-ID: <1ec946d1.0211131139.50f479e1@posting.google.com> (raw)
In-Reply-To: 3dcd00f3$0$307$bed64819@news.gradwell.net

porton@ex-code.com (Victor Porton) wrote in message news:<3dcd00f3$0$307$bed64819@news.gradwell.net>...
> There are a serious misdesign of Booch iterators:
> 
> Declaring a record component of type Iterator'Class,
> I get error "unconstrained subtype in component declaration".

You have identified what I consider to be a serious flaw in the Booch
Components.  The problem is that record components must be definite;
unconstrained subtypes must be given a constraint.

The BC iterator factory functions return Iterator'Class, which is
indefinite.  You cannot use T'Class as a record component.

The Charles library was optimized for flexibility, and therefore the
iterators in Charles are all "definite" subtypes, which means you can
use them as record components (or array components, or container
elements).

 
> So for every non-abstract collection type, a concrete iterator
> type should be visibly declared. 

Yes.

> It also suggests that types of
> arguments of subrountines should be changed from Iterator'Class
> to the appropriate concrete types.

Yes.



  parent reply	other threads:[~2002-11-13 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09 12:28 Problem with Booch iterators Victor Porton
2002-11-09 19:43 ` Simon Wright
2002-11-11  5:47 ` Victor Porton
2002-11-11 15:45 ` Ted Dennison
2002-11-13 19:39 ` Matthew Heaney [this message]
2002-11-14  6:44   ` Simon Wright
2002-11-15  0:41     ` Matthew Heaney
2002-11-15 12:47       ` Georg Bauhaus
2002-11-16  7:37       ` Simon Wright
replies disabled

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