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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: enikitin@apk.net (Eric W. Nikitin) Subject: Re: Reflection in Ada (was: Re: OO, C++, and something much better!) Date: 1997/01/29 Message-ID: <5cnto1$oq6@nerd.apk.net>#1/1 X-Deja-AN: 213451902 references: <32DF458F.4D5C@concentric.net> <32DF94DC.6FF8@watson.ibm.com> <32DFD972.37E4@concentric.net> <32E4FC5B.242C@watson.ibm.com> <32E6862D.608B@parcplace.com> <32E788D4.4B91@watson.ibm.com> <32E9F63A.159D@rase.com> <32ECDB2F.2447@watson.ibm.com> <32EE6A33.30C0@watson.ibm.com> organization: Akademia Pana Kleksa, Public Access Uni* Site newsgroups: comp.lang.ada Date: 1997-01-29T00:00:00+00:00 List-Id: Norman H. Cohen (ncohen@watson.ibm.com) wrote: : [Distribution for this post trimmed to comp.lang.ada] : : Brian Rogoff wrote: : : > In any case, I think it would be rather difficult to graft : > something like metaclasses (i.e. something like the CLOS MOP) onto Ada. : > I know there has been some work in adding such things to C++ and BETA, : > but I haven't really studied it. It does seem that dynamically typed : > languages are a more suitable vehicle for these sorts of reflective : > facilities. : : Not clear to me. I think the existence of tags as run-time values is a : good head start. An important missing piece, though, is the ability, : given a tag, to create an object of the corresponding type, as one can : do in Java with java.lang.Class.newInstance. There are no technical : obstacles to providing a similar facility in Ada 95; T'Class'Input : already has to do essentially the same thing (albeit with an external : rather than internal tag). : There is certainly no technical obstacle simply because Ada provides static typing. In fact, a thorough discussion of how such a feature can be added to Oberon is available at, ftp://ftp.inf.ethz.ch/pub/publications/dissertations/th10655.ps I'm afraid I don't know enough about Ada to suggest how to apply such a facility to it. -- Eric --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Those who know that they are profound strive for clarity. Those who would like to seem profound to the crowd strive for obscurity. He is a thinker; that means, he knows how to make things simpler than they are... - Friedrich Nietzsche ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~