TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Roger Racine <[log in to unmask]>
Reply To:
Roger Racine <[log in to unmask]>
Date:
Tue, 16 Sep 2003 09:57:11 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
I have always disagreed with the "don't use 'use'" rule.  To me, as long as
the subprograms are named well, it should not be necessary to expend the
additional work to put the package name in as well.  For the argument that it
tells people where the subprogram comes from, I reply "That is what 'grep' is
there for".  With a good support environment, one can also simply find the
declaration of the subprogram with a mouse click, without even the effort of
using "grep".

Please note that for those of us trying to sell Ada to C programmers, it is
bad enough to ask them to create lots of types and subtypes.  Demanding that
they put on the package name in front of every subtype, enumeration literal,
subprogram, etc. seems to be asking for a negative reaction.  These people
are quite used to name conflicts (and know how to use "grep"), and the
compiler will be happy to complain if name conflicts do occur, which is a
whole lot better than the C compiler reaction (maybe a warning that something
has been redefined).

I do understand that, with software spread across many directories, it can be
somewhat difficult to find things, but then all that is needed is a script
that looks in the appropriate places.

Roger Racine

On Monday 15 September 2003 12:23 pm, Steffen Bretz wrote:
> Hi,
>
> I agree with you with the positive effects verbose coding.
> Excessive use of the use clause makes a program hard to read,
> especially if packages are "use"d which are not standard. But
> I feel free to use it for packages wich are defined by the
> language - everybody knows them anyway. Sometimes I use the
> use clause also for self written packages, but only if it
> seemes to me to be clearly arranged (few lines of code and
> only one use).
>
> I seldomly name the parameters. The compiler can (and does)
> pay attention, that the parameter positions are not changed
>  - thanks to the type system. In cases where multiple parameters
> have compatible types, I find the parameter naming very usefull
> to garantuee a correct handing-over.
>

ATOM RSS1 RSS2