From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b2bad1e85ca20475 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,5b3c19b1631bb558 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-01 04:48:28 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!hermes.visi.com!news-out.visi.com!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.eiffel,comp.lang.ada References: <39DCB9E3.EAE8F426@ftw.rsc.raytheon.com> <39F9FCCE.D6719C6F@ftw.rsc.raytheon.com> <1c9kvs4uvj4ofd46f7a8vq0pju596iu2gr@4ax.com> <39fed7b6@rsl2.rslnet.net> <39FF1DBD.74184FDC@worldnet.att.net> <39ff792d@rsl2.rslnet.net> <39FF8DE3.EC0055B5@worldnet.att.net> Subject: Re: The best thing/greatest feature summary X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Wed, 01 Nov 2000 12:48:28 GMT NNTP-Posting-Host: 216.215.77.202 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 973082908 216.215.77.202 (Wed, 01 Nov 2000 06:48:28 CST) NNTP-Posting-Date: Wed, 01 Nov 2000 06:48:28 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.eiffel:948 comp.lang.ada:1680 Date: 2000-11-01T12:48:28+00:00 List-Id: "James Rogers" 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.