comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Source files organisation using gnat
Date: 1997/07/03
Date: 1997-07-03T00:00:00+00:00	[thread overview]
Message-ID: <dewar.867959470@merv> (raw)
In-Reply-To: 5pghpn$1k5@gcsin3.geccs.gecm.com


iDavid Haslam said

<<I understood the original poster as being concerned with the source
file organisation rather than library issues. The ada subdirectory
under the gcc source tree contains about a 1000 source files. Certainly I
would never organise a large project with a flat structure like this, I
would want a directory hierarchy. I'm sure I'm not alone in this.
>>

Hierarchies are not a good thing of themselves, they are helpful only
if they clarify structure. In this case we have hundreds of units that
the programmer can select from since it is the runtime library. I think
you will find many flat structures like this in API contexts. If you
have a Windows interface with several hundred calls, it is often quite
*unhelpful* to try to arrange the calls into hierarchical stuctures.

To me, the suggestion that adainclude be organized into a hierarchy
sounds like a huge pain in the neck.

So far, the objections have been formalistic "everyone knows that
flat structures this big are a *BAD THING*)"  (reminds me of
"everyone knows gotos are bad" etc.)

What would be far more helpful than these general philosophical
observations would be a very specific suggestion:

"I think adainclude should be organized like this, and here is why I
 think that, and here is the advantage of this reorganization."

Note that it is not an advantage to have more directories with fewer
files. Such an organization may or may not be better for a given purpose.

One suggestion some people have is to organize directories according to
the child unit hierarchy. That's superficially appealling, but in practice
is not at all a good idea (if you think it is a good idea, try stating
exactly why, from the point of someone using GNAT).

As another example of a large flat structure, suppose that, as on my Mac
when I was using it, you have a thousand fonts. They are all separate fonts,
there is no particular relation between any one font and any other. I
really don't see any objection to a flat structure in this case. Trying
to group fonts by function sounds useful, but in fact ends up being a pain,
because now you end up thinking:

"Where on earth did I put Adobe Garamond? was it under classic fonts? or
 new postscript fonts? or textbook fonts? ...."

Since (at least in my environment) I almost always want to fetch fonts
by name, any hierarchical arrngement gets in the way.

Of course the best arrangement depends on the expected usage. The
purpose of the adainclude directory is to provide runtime routines to
an Ada program, that are *always* fetched by name.

Now if on the other hand you want to browse the specs of the GNAT routines,
as a kind of not very well organized online RM Annex A, then the arrangement
is definitely NOT ideal, but that is not what adainclude is for!





  reply	other threads:[~1997-07-03  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-30  0:00 Source files organisation using gnat Laurentau
1997-06-30  0:00 ` Robert Dewar
1997-07-01  0:00   ` Samuel T. Harris
1997-07-04  0:00     ` Robert Dewar
1997-07-05  0:00       ` Michael Feldman
1997-07-03  0:00   ` David Haslam
1997-07-03  0:00     ` Robert Dewar [this message]
1997-07-09  0:00       ` Robert I. Eachus
1997-07-03  0:00   ` Steve Doiel
1997-07-04  0:00     ` Robert Dewar
1997-07-04  0:00       ` Michel Gauthier
1997-07-04  0:00         ` Robert Dewar
1997-06-30  0:00 ` Robert Dewar
1997-07-01  0:00 ` Michel Gauthier
1997-07-05  0:00   ` Robert Dewar
1997-07-06  0:00     ` Geert Bosch
1997-07-07  0:00       ` Tucker Taft
1997-07-08  0:00       ` Robert Dewar
1997-07-08  0:00         ` nabbasi
1997-07-08  0:00           ` Robert Dewar
1997-07-01  0:00 ` Michael F Brenner
1997-07-01  0:00   ` Robert Dewar
1997-07-02  0:00   ` Wes Groleau
1997-07-07  0:00     ` Michael F Brenner
1997-07-01  0:00 ` Geert Bosch
1997-07-02  0:00   ` Source files organisation using gnat: more Laurentau
1997-07-02  0:00     ` Robert B. Love 
1997-07-02  0:00       ` nasser
1997-07-03  0:00     ` Ian Caldwell
1997-07-03  0:00     ` Michael F Brenner
replies disabled

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