TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Robin Reagan <[log in to unmask]>
Sat, 4 Nov 2000 12:46:13 -0700
text/plain; charset="us-ascii"; format=flowed
Robin Reagan <[log in to unmask]>
text/plain (39 lines)
Hi all,


I've started a new project on my own and I am trying to use as much
reusable code as possible. The problem (actually more of an
annoyance) I'm running into is that most of the code I'm trying to
reuse, has a "use" statement for each "with" statement. When trying
to debug or just understand what is going on in someone else's code,
it makes it more difficult to trace where things are coming from
when the "use" is added for no apparent reason then the convenience
of typing fewer characters.

For those of you that are distributing reusable code, you might want
to think about this as it makes your code less readable/reusable
when there are "use" statements for each "with" (IMHO).

One of the things that make languages like C/C++ (among others) so
difficult to read is that you can't tell where the function/type...
is located by just looking at it. This is one of the strengths of
Ada (again IMHO).

I've almost never needed a "use" statement other then the "use type"
for operator visibility. For long package names the renames statement
works great as long as it is used consistently and intuitively.

Just my $0.02


    / / / |^| \ \ \  Robin Reagan
   / //   X X   \\ \  [log in to unmask]
  //               \\
/                   \
"Every man takes the limits of his own field of vision for the
limits of the world."---Schopenhauer