comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: Subverting 'Access for Sub-programs
Date: 1999/08/06
Date: 1999-08-06T18:27:38+00:00	[thread overview]
Message-ID: <7of9eq$2ue$1@wanadoo.fr> (raw)
In-Reply-To: m3iu6tjw2d.fsf@vault83.infomatch.bc.ca

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]


Ray Blaak <blaak@infomatch.com> a �crit dans le message :
m3iu6tjw2d.fsf@vault83.infomatch.bc.ca...
> Robert Dewar <robert_dewar@my-deja.com> writes:
> > But it is pretty fundamental and obvious that a tagged type
> > cannot be extended in a temporary inner scope, no?
>
> It is not fundamental and obvious to me. Perhaps you could explain.
>
> I am aware of implementation concerns with allowing such a thing, but the
> restriction seems is an exception to the generality of declaring Ada
> constructs that is usually allowed.
>
> One can declare types, exceptions, variables, and routines anywhere,
except for
> tagged types. This restriction prevents a completely localized programming
> style when doing OO stuff.
>
Remember that tagged types basically include an array of pointers to
subprograms, so the restrictions on tagged types are the same as those on
pointers to subprograms.

I find it a bit unfair to blame Ada for these restrictions. C++, Eiffel,
Java have no embedded subprograms. Turbo-Pascal with objects (I gave up with
Turbo-Pascal before it became Delphi, but I guess it is the same for Delphi)
allows classes only at the top level. In all these case, there is no issue
since everything MUST be global. Ada's restriction is that derivations must
occur at the same level as the parent type, while other languages force
derivations only at level 1. So Ada is actually more liberal than other OO
languages I know of. You may regret that Ada is not even more liberal, but
please consider that the situation is better than other languages.

--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://perso.wanadoo.fr/adalog







  reply	other threads:[~1999-08-06  0:00 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-03  0:00 Subverting 'Access for Sub-programs Anton Gibbs
1999-08-03  0:00 ` Ted Dennison
1999-08-03  0:00 ` Steve Doiel
1999-08-03  0:00 ` tmoran
1999-08-03  0:00 ` Brian Rogoff
1999-08-03  0:00 ` Michael F. Yoder
1999-08-03  0:00 ` David C. Hoos, Sr.
1999-08-05  0:00   ` Robert A Duff
1999-08-04  0:00 ` Robert Dewar
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Robert Dewar
1999-08-04  0:00 ` Anton Gibbs
1999-08-04  0:00   ` Jean-Pierre Rosen
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` Jean-Pierre Rosen
1999-08-05  0:00         ` adam
1999-08-05  0:00           ` adam
1999-08-06  0:00             ` Robert A Duff
1999-08-06  0:00               ` adam
1999-08-09  0:00                 ` Mark Biggar
1999-08-09  0:00                 ` Robert A Duff
1999-08-05  0:00           ` Robert Dewar
1999-08-05  0:00             ` What is a Display ? (was: Subverting 'Access for Sub-programs) Larry Kilgallen
1999-08-05  0:00               ` Hyman Rosen
1999-08-06  0:00                 ` Robert Dewar
1999-08-06  0:00               ` Robert Dewar
1999-08-05  0:00         ` Subverting 'Access for Sub-programs Robert A Duff
1999-08-05  0:00           ` Robert Dewar
1999-08-05  0:00           ` tmoran
1999-08-06  0:00             ` Robert A Duff
1999-08-05  0:00           ` Brian Rogoff
1999-08-06  0:00             ` Robert Dewar
1999-08-09  0:00               ` Tucker Taft
1999-08-10  0:00                 ` Robert Dewar
1999-08-11  0:00                   ` Tucker Taft
1999-08-13  0:00                     ` Robert Dewar
1999-08-13  0:00                       ` Brian Rogoff
1999-08-13  0:00                     ` Robert Dewar
1999-08-11  0:00                   ` Robert A Duff
1999-08-11  0:00                     ` Robert Dewar
1999-08-11  0:00                   ` Dmitry A. Kazakov
1999-08-11  0:00                     ` Robert Dewar
1999-08-12  0:00                       ` Dmitry A. Kazakov
1999-08-14  0:00                         ` Robert Dewar
1999-08-16  0:00                           ` Dmitry A. Kazakov
1999-08-11  0:00                     ` Richard D Riehle
1999-08-06  0:00         ` Brian Rogoff
1999-08-07  0:00           ` Gautier
1999-08-05  0:00     ` Robert A Duff
1999-08-05  0:00       ` Robert Dewar
1999-08-05  0:00         ` Brian Rogoff
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` tmoran
1999-08-05  0:00         ` Robert Dewar
1999-08-05  0:00           ` Ray Blaak
1999-08-06  0:00             ` Jean-Pierre Rosen [this message]
1999-08-06  0:00               ` Hyman Rosen
1999-08-07  0:00                 ` Florian Weimer
1999-08-06  0:00             ` Robert Dewar
1999-08-06  0:00               ` Robert A Duff
1999-08-08  0:00                 ` Brian Rogoff
1999-08-09  0:00                   ` Robert A Duff
1999-08-10  0:00                     ` Brian Rogoff
1999-08-09  0:00                 ` Tucker Taft
1999-08-05  0:00         ` Aidan Skinner
1999-08-05  0:00     ` Anton Gibbs
1999-08-05  0:00   ` Steve Quinlan
replies disabled

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