comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Function Calls by Address
Date: 1999/09/22
Date: 1999-09-22T00:00:00+00:00	[thread overview]
Message-ID: <wcc7lljb0yn.fsf@world.std.com> (raw)
In-Reply-To: 37E81079.CC2566D9@mitre.org

"Robert I. Eachus" <eachus@mitre.org> writes:

>     The point is that, without context clauses on subunits, it is easy
> to syntactically remove all instances of the keyword separate from an
> Ada program.
> However, with the with clauses, not only do you have to do at least as
> much
> semantic analysis as is required to remove use clauses, but there are
> programs where you have to do significant restructuring to provide a
> legal elaboration
> order.  (You may also need to tell the compiler what that order is.) 
> This
> problem is, at a minimum NP hard, and it may in fact be impossible to
> determine
> if such an order exists.

You still haven't answered my question about what your imaginary tool is
supposed to transform the subunits into.  I'm guessing that you mean it
should insert the subunits in place of the stubs, and shuffle the
with_clauses around as necessary.  That is, you are not requiring that
the subunits still be separately compiled (ie transformed into child
units).

I don't understand the elaboration order issue.  The rules are that the
elaboration or is *exactly* as if you move all the with_clauses from the
subunits up to the containing library unit.  So that part is easy.

Of course, if you move with_clauses around, you need to do overload
resolution to figure out how to resolve any naming conflicts you've
introduced.  Yeah, that's kind of hard (but certainly no harder than
writing an Ada compiler).

But I *still* don't see how it proves that with_clauses on subunits are
useful or good.  I'm not disputing that they are useful or good -- I'm
just saying I don't see how the difficulty of this imaginary tool has
anything to do with it.  I mean, it's hard to parse C programs because
of the weird way typedefs work -- but that doesn't prove that the weird
way typedefs work is good.  In Ada, it's hard for the compiler to tell
the difference between "and" as an operator symbol, and "and" as a
normal string literal.  (That is, consider a tool that changed all
user-defined operators and their uses into identifier-named functions --
it would be hard to do in the general case.)  But that fact doesn't
prove there's some useful expressive power there -- in fact, in C++ it's
easy to find operator symbols lexically, and I would say that's one
thing about C++ that's *better* than Ada.

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  parent reply	other threads:[~1999-09-22  0:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-30  0:00 Function Calls by Address Craig Jameson
1999-08-30  0:00 ` Robert Dewar
1999-08-31  0:00   ` Martin Gangkofer
1999-08-30  0:00 ` Marin David Condic
1999-08-30  0:00   ` Marin David Condic
1999-08-30  0:00     ` Larry Kilgallen
1999-08-30  0:00   ` Robert Dewar
1999-08-30  0:00 ` Robert Dewar
1999-08-31  0:00 ` David Kristola
1999-08-31  0:00 ` Matthew Heaney
1999-09-01  0:00 ` Simon Wright
1999-09-02  0:00 ` Francois Godme
1999-09-03  0:00   ` Robert Dewar
1999-09-03  0:00     ` Francois Godme
1999-09-03  0:00       ` David C. Hoos, Sr.
1999-09-04  0:00         ` Robert Dewar
1999-09-05  0:00           ` Francois Godme
1999-09-06  0:00             ` Robert Dewar
1999-09-06  0:00               ` Francois Godme
1999-09-06  0:00                 ` Robert Dewar
1999-09-06  0:00                 ` Robert Dewar
1999-09-06  0:00                   ` Bob Collins
1999-09-07  0:00                     ` Pascal Obry
1999-09-07  0:00                 ` Pascal Obry
1999-09-07  0:00                   ` Francois Godme
1999-09-08  0:00                   ` Francois Godme
1999-09-03  0:00       ` Marin David Condic
1999-09-14  0:00         ` Robert I. Eachus
     [not found]           ` <wcc3dwgb7ii.fsf@world.std.com>
     [not found]             ` <37E81079.CC2566D9@mitre.org>
1999-09-22  0:00               ` Robert A Duff [this message]
1999-09-22  0:00                 ` Robert I. Eachus
1999-09-23  0:00                 ` Robert Dewar
1999-09-23  0:00                   ` Robert A Duff
1999-09-03  0:00       ` Robert Dewar
1999-09-03  0:00         ` Ted Dennison
1999-09-04  0:00           ` Jean-Pierre Rosen
1999-09-05  0:00             ` Matthew Heaney
1999-09-05  0:00             ` Ehud Lamm
1999-09-04  0:00         ` Brian Rogoff
1999-09-05  0:00           ` Robert Dewar
1999-09-05  0:00           ` Robert Dewar
1999-09-05  0:00           ` Robert Dewar
1999-09-03  0:00       ` Simon Wright
1999-09-04  0:00       ` Mario Klebsch
1999-09-05  0:00         ` Robert Dewar
1999-09-06  0:00           ` Francois Godme
1999-09-05  0:00             ` Brian Rogoff
1999-09-06  0:00             ` Robert Dewar
1999-09-08  0:00               ` Georg Bauhaus
1999-09-05  0:00       ` Geoff Bull
1999-09-07  0:00       ` Michael F. Yoder
replies disabled

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