From: Simon Wright <simon@pushface.org>
Subject: Re: Problem with Booch iterators
Date: 14 Nov 2002 06:44:28 +0000
Date: 2002-11-14T06:44:28+00:00 [thread overview]
Message-ID: <x7visz0ps4z.fsf@smaug.pushface.org> (raw)
In-Reply-To: 1ec946d1.0211131139.50f479e1@posting.google.com
mheaney@on2.com (Matthew Heaney) writes:
> 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.
But then, given a non-STL mindset, why would you want to? In the STL,
iterators are related to the notion of pointer; in the BCs, they
aren't (to anything like the same extent). In the original BCs,
iterators were limited too, so you had to have a concrete iterator per
concrete container type .. well, actually, for half of them (the
leaves were foo_Iterator, foo_Non_Iterator).
I would like to know just how many real C++ programs use iteration
ranges other than begin() .. end().
> > It also suggests that types of arguments of subrountines should be
> > changed from Iterator'Class to the appropriate concrete types.
>
> Yes.
Well, in Charles I guess that Iterator'Class is a pretty meaningless
concept.
next prev parent reply other threads:[~2002-11-14 6:44 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
2002-11-14 6:44 ` Simon Wright [this message]
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