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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: "Norman H. Cohen" Subject: Reflection in Ada (was: Re: OO, C++, and something much better!) Date: 1997/01/28 Message-ID: <32EE6A33.30C0@watson.ibm.com>#1/1 X-Deja-AN: 212945340 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> content-type: text/plain; charset=us-ascii organization: IBM Thomas J. Watson Research Center mime-version: 1.0 reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Win95; I) Date: 1997-01-28T00:00:00+00:00 List-Id: [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). -- Norman H. Cohen mailto:ncohen@watson.ibm.com http://www.research.ibm.com/people/n/ncohen