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,dd8f3dccd1e7e410 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Dynamic run-time Date: 2000/03/30 Message-ID: <38E3BAC4.FC400CA4@averstar.com>#1/1 X-Deja-AN: 604502052 Content-Transfer-Encoding: 7bit References: <8bvp21$ssv$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@inmet2.burl.averstar.com X-Trace: inmet2.burl.averstar.com 954448580 26620 141.199.8.164 (30 Mar 2000 20:36:20 GMT) Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 NNTP-Posting-Date: 30 Mar 2000 20:36:20 GMT Newsgroups: comp.lang.ada Date: 2000-03-30T20:36:20+00:00 List-Id: xaplos@my-deja.com wrote: > > Does Ada provide an equivalent way of realizing the dynamic behavior > that SmallTalk or Objective-C provides? For instance is there a datatype > like Objective-C's id that allows variables and methods to be > dynamically bind at run-time? Not really. Using tagged types you can do the kind of dynamic binding that exists in C++ or Eiffel, but not the kind of "very dynamic" binding that you can do in SmallTalk. The upside is that in Ada you will never get a "message not understood." The downside is that you can't read in from a terminal or equivalent the name of a function or variable and somehow find and use the named entity. It is possible to do things like this using a symbolic debugger, of course, and it is possible to build tools that process the debug tables created by the compiler and make those tables available at run-time to the program. This is a fair amount of work, but I have seen it used in an Ada-based object-oriented database manager (for a somewhat different purpose). -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA