comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: The best thing/greatest feature summary
Date: Wed, 1 Nov 2000 08:03:58 -0600
Date: 2000-11-01T08:03:58-06:00	[thread overview]
Message-ID: <lpVL5.458$K93.243887@nnrp1.sbc.net> (raw)
In-Reply-To: wiUL5.2554$pq3.156683@news.flash.net


"Ken Garlington" <Ken.Garlington@computer.org> wrote in message
news:wiUL5.2554$pq3.156683@news.flash.net...
> "James Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message
> news:39FF8DE3.EC0055B5@worldnet.att.net...
>
> : If you only want to emulate the Member interface in
java.lang.reflect
> : you can instantiate the following generic package in the bodies of
your
> : packages.
> :
>
: --------------------------------------------------------------------
---
> : -- Generic package to define a "common" interface for providing
> : -- debug information.
>
: --------------------------------------------------------------------
---
> : generic
> :
> :    Package_Name : String;
>
> This, of course, is the critical difference between your solution
and the
> Java solution. "Package_Name" may, or may not, be the name of the
Ada
> package -- its correctness is only enforced by the programmer's
diligence
> (particularly in the face of changes). The Java method does not
depend upon
> keeping the same information copied in two places, as in
>
> package MyPackage is -- [1]
>
>   package R is new Reflect("MyPackage"); -- [2]
>
> Given that a goal of Ada is to reduce errors due to copying, the
argument
> that the Ada approach is not as desirable as the Java approach seems
like a
> valid criticism to me. It gets worse, of course, if you want to
implement
> more than just the package name: a full implementation of the Java
> functionality could presumably include the names of types, objects,
record
> components, subprograms, parameters /return types, and exception
names.

There are two facilities within reflection: introspection and
intercession.  The above is an example of introspection, the ability
of a computational process to query a representation of itself.
Intercession allows the process to alter itself.  For example, in the
above discussion, intercession would support the insertion of the
debugging code itself.

Sun's Java only supports run-time introspection, but not intercession.
For a fully reflective implementation of Java see OpenJava
(http://www.hlla.is.tsukuba.ac.jp/~mich/openjava/).  There are others
too.

For my PhD thesis I've implemented compile-time reflection for full
Ada, including both introspection and intercession.  It is similar to
both OpenC++, arguably the most widely used reflective language
(http://www.hlla.is.tsukuba.ac.jp/~chiba/openc++.html), and OpenJava.
At some point I'll make it available.


Pat
---
Patrick Rogers                      Consulting and Training in:
http://www.classwide.com      Deadline Schedulability Analysis
progers@classwide.com        Software Fault Tolerance
(281)648-3165                       Real-Time/OO Languages

Adam ... does not deserve all the credit; much is due to Eve, the
first woman, and Satan, the first consultant.
Mark Twain





  reply	other threads:[~2000-11-01 14:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <39DCB9E3.EAE8F426@ftw.rsc.raytheon.com>
2000-10-27 22:08 ` The best thing/greatest feature summary Wes Groleau
2000-10-28  1:01   ` Lothar Scholz
2000-11-24  2:15     ` Peter Horan
2000-11-24  0:00       ` Lothar Scholz
2000-11-24  0:00         ` Friedrich Dominicus
2000-10-28  1:03   ` Lothar Scholz
2000-10-31 14:44     ` Tom Hargraves
2000-10-31 18:07       ` tmoran
2000-10-31 19:58         ` Larry Kilgallen
2000-11-01  1:56         ` Tom Hargraves
2000-10-31 19:28       ` James Rogers
2000-11-01  2:13         ` Tom Hargraves
2000-11-01  3:27           ` James Rogers
2000-11-01 12:48             ` Ken Garlington
2000-11-01 14:03               ` Pat Rogers [this message]
2000-11-01 15:30               ` James Rogers
2000-11-01 22:12                 ` Tom Hargraves
2000-11-01 22:44                   ` Ted Dennison
2000-11-01 22:54                   ` Pat Rogers
2000-11-01 23:47                     ` James Rogers
2000-11-02  5:25                       ` Pat Rogers
2000-11-02  5:28                       ` Pat Rogers
2000-11-02 22:00                       ` Wes Groleau
2000-11-02  3:45                 ` Reflection (was: Re: The best thing/greatest feature summary) Jeff Carter
2000-11-02  6:57                   ` Ray Blaak
2000-11-02  8:42                     ` tmoran
2000-11-02 11:19                       ` David C. Hoos, Sr.
2000-11-02 18:09                         ` tmoran
2000-11-02 12:51                       ` David C. Hoos, Sr.
2000-11-03  2:26                         ` Jeff Carter
2000-11-02 14:33                     ` Tucker Taft
2000-11-02 16:02                     ` Ted Dennison
2000-11-04  0:00                       ` Florian Weimer
2000-11-03  2:23                     ` Jeff Carter
2000-11-03  5:05                   ` Randy Brukardt
2000-11-03  5:28                     ` Ken Garlington
2000-11-04  4:13                     ` Jeff Carter
2000-11-10  0:00       ` The best thing/greatest feature summary jacob navia
2000-10-31 21:01   ` Wes Groleau
2000-10-30 20:19 ` Roger Browne
2000-10-31 16:24   ` Greg
2000-10-31 16:55   ` Roger Browne
replies disabled

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