From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 27 Jul 93 23:05:42 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: Anyone else actually like Ada? Message-ID: List-Id: In article <1993Jul27.155947.11409@tinton.ccur.com> cjh@tinton.ccur.com (Christ opher J. Henrich) writes: > In Ada83 you can achieve some of the same goals, by careful use of > generic units with subprogram formals. The decision about what code > to bind to the "formals" must be made at compilation time, and > the syntax of generic units makes it all seem much more rigid. For the one-millionth time...elaboration of generic instantiations occurs at RUN-TIME. It is always the case that a compiler can determine at compile time the possible subprograms which will match a particular generic formal parameter, but that in no way limits the usefulness of the feature. For example if you add: function "+"(L,R: My_Type) return My_Type is <>; at the end of a generic formal part with a generic formal type My_Type, this will match the plus operator for the actual type which is visible at the point of instantiation, instead of the predefined operator for the type. Also most good Ada compilers do support calling of subprograms by their address, and among those which do, the feature mixes cleanly with generics. What Ada 9X will add is the safety of parameter and result profile matching. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...