comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Non private & private Import
Date: Sat, 16 Dec 2000 17:11:24 GMT
Date: 2000-12-16T17:11:24+00:00	[thread overview]
Message-ID: <91g7np$55i$1@nnrp1.deja.com> (raw)
In-Reply-To: 976978132.359056@tubarao.ip.pt

In article <976978132.359056@tubarao.ip.pt>,
  antonio.vargas@clix.pt wrote:
>
> Hi.
>
> What are the advantages/disadvantages of

<<examples snipped>>

They are equivalent semantically. So choose on the
basis of whether you think it is part of the public
interface or not.

In the specific examples you gave, there were no
comments, which seems a bad thing. Given the lack
of comments, you have to prefer the public import,
since at least that gives some information about
what on earth the subprogram does. The private
version is completely useless since it gives the
client absolutely not the slightest clue as to
what the subprogram is for.

In either case, comments would be a highly desirable
addition, and would focus your attention on the
issue you are raising, which is whether or not it
is part of the public interface that the subprogram
is imported and has convention C.

If you want to be really persnickety, it SHOULD be
part of the interface that the convention is C,
because this is semantically visible, but in practice
it is very unlikely to make a difference. For most
purposes anyway it makes sense to have the import
be right next to the subprogram declaration.


Sent via Deja.com
http://www.deja.com/



      reply	other threads:[~2000-12-16 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-16 13:48 Non private & private Import Antonio Vargas
2000-12-16 17:11 ` Robert Dewar [this message]
replies disabled

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