comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: should I be interested in ada?
Date: 1999/02/25
Date: 1999-02-25T00:00:00+00:00	[thread overview]
Message-ID: <7b2j2u$drp$1@plug.news.pipex.net> (raw)
In-Reply-To: 36D33B65.446B@lanl.gov

William Clodius wrote in message <36D33B65.446B@lanl.gov>...
|Ni<snip>
|> Its true that the Ada code doesn't capture the same semantics -
essentially
|> that no component of Object will be assigned more than once (and they can
be
|> assigned in any order) - but I'm not sure that this will make any
difference
|> in practice (for a non-parallel target).
|
|The above "essentially" demphasizes my main point, that it also doesn't
|capture the semantics that the assignment may involve only part of the
|objects X and J.


I apologise; it's not my intention to use rhetoric to defeat your example.

In the case of the Reorder procedure example I gave, a part of X could be
reordered simply by passing a part of it into the call, e.g.:

   Reorder(X(a..b),J);

The domain of J could be restricted by the same method, and its range by
introducing two new parameters to the procedure, e.g.:

   Reorder(X(a..b),J(a..b),a,b);

Again, not neat, but workable.

|In thinking about this further, one additional problem to me is the
|decision to make this an explicit procedure. I would normally do this
|only under circumstances that need not apply to this case, i.e., if I
|were going to use it at multiple points in the code or if it were doing
|a complicated task that is easilly summarized. Under those circumstances
|I would want a well documented routine. Reorder by itself could mean the
|equivalent of any of the following


I used a procedural abstraction, because it seemed appropriate in this case.
In cases where an abstraction would not be appropriate, in-line code could
be used instead.

|The isolation of the code in this way makes it more difficult to verify
|that it has the semantics required in the context in which it is
|currently used, and even if appropriate there, increases the chance that
|it will be reused in inappropriate contexts.


So, in these cases, the inline Ada code ends up being substantially longer
than the Fortran.  However, if you were to take a typical Fortran program,
and translate it into Ada, would you end up with a program that was
substantially bigger (more than two times, say)?  Would have any really
thorny problems in doing the translation?  I would say "very unlikely" to
both questions.

I suppose it now falls to me to illustrate this with an example! :-)

|William B. Clodius Phone: (505)-665-9370
|Los Alamos Nat. Lab., NIS-2     FAX: (505)-667-3815
|PO Box 1663, MS-C323    Group office: (505)-667-5776
|Los Alamos, NM 87545            Email: wclodius@lanl.gov

-------------------------------------
Nick Roberts
-------------------------------------







  reply	other threads:[~1999-02-25  0:00 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 should I be interested in ada? Phillip Helbig
1999-02-15  0:00 ` Marin David Condic
1999-02-23  0:00   ` David Starner
1999-02-15  0:00 ` Gautier
1999-02-16  0:00 ` Ken Thomas
1999-02-17  0:00   ` Nick Roberts
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` dennison
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` robert_dewar
1999-02-19  0:00           ` Nick Roberts
1999-02-19  0:00             ` robert_dewar
1999-02-19  0:00               ` Phillip Helbig
1999-02-19  0:00               ` dennison
1999-02-19  0:00                 ` Nick Roberts
1999-02-20  0:00                   ` robert_dewar
1999-02-22  0:00                     ` Nick Roberts
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                 ` William Clodius
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` dennison
1999-02-22  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` Robert I. Eachus
1999-02-24  0:00                       ` White rabbit (was: should I be interested in ada?) dennison
1999-02-25  0:00                       ` Alice books " JP Thornley
1999-02-25  0:00                         ` Robert I. Eachus
1999-02-20  0:00                 ` should I be interested in ada? robert_dewar
1999-02-20  0:00                   ` Steve Doiel
1999-02-19  0:00               ` William Clodius
1999-02-18  0:00         ` Jerry Petrey
1999-02-18  0:00           ` Nick Roberts
1999-02-18  0:00             ` Joel Seidman
1999-02-18  0:00             ` Dan Nagle
1999-02-18  0:00               ` nabbasi
1999-02-19  0:00               ` Nick Roberts
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                   ` Nick Roberts
1999-02-19  0:00                     ` robert_dewar
1999-02-21  0:00                       ` William Clodius
1999-02-23  0:00                         ` Robert I. Eachus
1999-02-19  0:00                     ` William Clodius
1999-02-20  0:00                       ` Nick Roberts
1999-02-21  0:00                         ` robert_dewar
1999-02-21  0:00                           ` William Clodius
1999-02-22  0:00                           ` Nick Roberts
1999-02-19  0:00                 ` Dan Nagle
1999-02-19  0:00                   ` robert_dewar
1999-02-19  0:00                     ` Dan Nagle
1999-02-19  0:00                     ` Nick Roberts
1999-02-23  0:00                     ` Peter Hermann
1999-02-18  0:00           ` fraser
1999-02-19  0:00             ` Matthew Heaney
1999-02-20  0:00               ` fraser
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` nabbasi
1999-02-18  0:00             ` robert_dewar
1999-02-18  0:00           ` robert_dewar
1999-02-19  0:00             ` William Clodius
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` Nick Roberts
1999-02-22  0:00                     ` William Clodius
1999-02-23  0:00                     ` robert_dewar
1999-02-23  0:00                       ` Nick Roberts
1999-02-22  0:00                 ` William Clodius
1999-02-23  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` William Clodius
1999-02-25  0:00                       ` Nick Roberts [this message]
1999-02-25  0:00                         ` robert_dewar
1999-02-23  0:00               ` Robert I. Eachus
1999-02-24  0:00                 ` Nick Roberts
1999-02-26  0:00                   ` Robert A Duff
1999-02-27  0:00                     ` Semantic info pragmas (was: should I be interested in ada?) Nick Roberts
1999-03-01  0:00                       ` Samuel Tardieu
1999-03-01  0:00                         ` Robert A Duff
1999-02-24  0:00                 ` should I be interested in ada? William Clodius
1999-02-24  0:00               ` William Clodius
1999-02-25  0:00                 ` Nick Roberts
1999-02-25  0:00                   ` robert_dewar
1999-02-26  0:00                     ` Nick Roberts
1999-02-20  0:00 ` Hartmut H. Schaefer
1999-02-20  0:00   ` bill
1999-02-21  0:00     ` dewar
1999-02-21  0:00   ` dewar
1999-02-22  0:00     ` dennison
replies disabled

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