comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada/Java
@ 1997-04-25  0:00 tmoran
  1997-04-27  0:00 ` Ada/Java Robert Dewar
  0 siblings, 1 reply; 14+ messages in thread
From: tmoran @ 1997-04-25  0:00 UTC (permalink / raw)



> > > >   Must each record be a class?  Not all Ada records are tagged types.
> > >
> > > Java does not support any other kind of first class object which has
> > > structure.
> >   So, at the Jave byte code level there is no structure larger than
> > "words"?
>
> You've lost me.  The basic point is that you want your Ada to fit in
> as transparently as possible with any stuff generated from Java (the
> language).

Consider two ways of making a Point
  type Coordinates is (X,Y);
  type Point is array(Coordinates) of Integer;
vs
  type Point is record
    X : Integer;
    Y : Integer;
  end record;

If I write "Starting_Point(X) := 0;" for the first, or
"Starting_Point.X := 0;" for the second, I would expect rather similar
instructions to be generated at the (virtual) machine code level.  But
in Jave these are very different - the second (record) approach apparently
requires a whole additional file.  My question is "why can't the compiler
recognize that the record approach is similar to the array approach and
use the much less expensive array style?".  I gather the answer is that
the Java byte code for some reason does not allow this.




^ permalink raw reply	[flat|nested] 14+ messages in thread
* Ada/Java
@ 1997-04-16  0:00 tmoran
  1997-04-20  0:00 ` Ada/Java Tucker Taft
  1997-04-22  0:00 ` Ada/Java David Wheeler
  0 siblings, 2 replies; 14+ messages in thread
From: tmoran @ 1997-04-16  0:00 UTC (permalink / raw)



I'd add an additional problem to the ones mentioned in the recent Ada
Letters article "Experience Programming Java Applets with Ada95" by
Kann, Feldman, and Sibert.  Every record definition becomes a Java
class, which means it becomes a separate file.  I put a very small
application up on a web page hosted on AOL and each of those files,
while small, results to the downloader in 5-10 seconds of "connecting,
waiting for response" messages.  The option of a different web host
site is not always available, and writing a significant program
without using records feels like a return to Fortran.




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1997-04-28  0:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-25  0:00 Ada/Java tmoran
1997-04-27  0:00 ` Ada/Java Robert Dewar
1997-04-28  0:00   ` Ada/Java Tom Moran
1997-04-28  0:00     ` Ada/Java Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1997-04-16  0:00 Ada/Java tmoran
1997-04-20  0:00 ` Ada/Java Tucker Taft
1997-04-21  0:00   ` Ada/Java Tom Moran
1997-04-22  0:00 ` Ada/Java David Wheeler
1997-04-22  0:00   ` Ada/Java Tom Moran
1997-04-22  0:00     ` Ada/Java Jon S Anthony
1997-04-23  0:00       ` Ada/Java Samuel Tardieu
1997-04-24  0:00         ` Ada/Java Jon S Anthony
1997-04-23  0:00       ` Ada/Java Tom Moran
1997-04-25  0:00         ` Ada/Java Jon S Anthony

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