comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Usage of Interfaces with Ada 95
Date: Tue, 30 Sep 2003 21:46:22 GMT
Date: 2003-09-30T21:46:22+00:00	[thread overview]
Message-ID: <3F79F996.3020500@comcast.net> (raw)
In-Reply-To: 1064929111.851223@master.nyc.kbcfp.com

Hyman Rosen wrote:

> Let me see if I have this right. I believe that in Ada, controlled
> types can be declared only at library level, correct? So if the
> mix-in is going to do something with its containing object, then
> doesn't the type of the containing object have to be declared at
> library level as well? This means that the awkward inheritance-based
> model of controlled drives the package structure, which seems like a
> bad idea to me.

There are only two times I tend to put type declarations inside 
procedures:  In small examples where it is nice to be able to tell 
someone to compile a file and run it, and when the main procedure is a 
manager for a complex application, and I need to enumerate the parts:
type Pass is (Syntax_Analysis, Semantic_Analysis, Optimizer, 
Code_Generation);

So other than trivial examples, ALL tagged types I create are at the 
library level.  It doesn't matter if the package containing the is 
nested six deep within other packages, as long as the outermost package 
is at the library level, all the nested packages are also.

-- 
                                                     Robert I. Eachus

"Quality is the Buddha. Quality is scientific reality. Quality is the 
goal of Art. It remains to work these concepts into a practical, 
down-to-earth context, and for this there is nothing more practical or 
down-to-earth than what I have been talking about all along...the repair 
of an old motorcycle."  -- from Zen and the Art of Motorcycle 
Maintenance by Robert Pirsig




  reply	other threads:[~2003-09-30 21:46 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26 16:36 Usage of Interfaces with Ada 95 Michael Erdmann
2003-09-26 16:50 ` chris
2003-09-26 16:55 ` Hyman Rosen
2003-09-26 19:10   ` Michael Erdmann
2003-09-26 20:37     ` Hyman Rosen
2003-09-27 15:05       ` Michael Erdmann
2003-09-28  2:11         ` Matthew Heaney
2003-09-29  2:25         ` George Shapovalov
2003-09-28  2:14   ` Matthew Heaney
2003-09-28  8:28     ` Michael Erdmann
2003-09-28 14:33       ` Matthew Heaney
2003-09-28 15:09         ` Michael Erdmann
2003-09-28 21:50           ` Matthew Heaney
2003-09-30  4:57             ` Michael Erdmann
2003-09-30 10:02               ` Mário Amado Alves
2003-09-30 12:31               ` Matthew Heaney
2003-09-30 19:58                 ` Michael Erdmann
2003-09-28 17:10         ` Simon Wright
2003-09-28 21:52           ` Matthew Heaney
2003-09-28 21:58           ` Matthew Heaney
2003-09-29 19:37             ` Georg Bauhaus
2003-09-29 19:45               ` Georg Bauhaus
2003-09-30  7:10               ` Preben Randhol
2003-09-29 20:11             ` Simon Wright
2003-09-29 22:56               ` Matthew Heaney
2003-09-30 14:53                 ` Matthew Heaney
2003-09-30 16:13                   ` Preben Randhol
2003-09-29 13:49           ` Matthew Heaney
2003-09-28 18:22       ` Robert I. Eachus
2003-09-29  3:02         ` Hyman Rosen
2003-09-30  3:11           ` Robert I. Eachus
2003-09-30 13:38             ` Hyman Rosen
2003-09-30 21:46               ` Robert I. Eachus [this message]
2003-09-30 22:10                 ` Hyman Rosen
2003-10-01  2:30                   ` Robert I. Eachus
2003-10-01  2:41                   ` Robert I. Eachus
2003-10-01 13:21                     ` Hyman Rosen
2003-10-01 17:01                       ` Robert I. Eachus
2003-10-01 18:46                       ` Matthew Heaney
2003-09-29 14:52       ` Stephen Leake
2003-09-29 23:00         ` Matthew Heaney
2003-09-30 12:49           ` Marin David Condic
2003-09-30 23:48             ` 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