xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) (09/03/90)
grover@brahmand.Eng.Sun.COM (Vinod Grover) writes: >ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe) writes: >>Algol 68 was the first language I met that allowed overloading, but from >>the published discussions of the Algol 68 committee overloading was already >>a well known idea then. Anyone know where it first showed up? ... > >I believe that Christopher Strachey used the term "ad hoc polymorphism" to >refer to a breed of overloading. I *think* that was before Algol 68. Further back than that, FORTRAN implemented what we now know as overloading when: INTEGER I,J,K,L,M REAL A,B,C,D,E A = I + B B = D + E J = K + L all produced sensible answers. One can speak of "promotion" of the integers to reals, but it is equally useful to speak of the "overloading" of "+" in this situation, as we tend to do today. Memory fades after 30 years, but I think some of the early built-in math functions had overloaded alias names, too, so that IFUNCT(someinteger) and RFUNCT(somereal) and FUNCT(anything) all got the conceptual FUNCT operation, the latter on either integer or real values and returning the appropriate type depending on the type of the parameter. Check this one out before believing me, it _has_ been a while, and it might have been a later version of FORTRAN. Kent, the man from xanth. <xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us> [Generic functions only made it into standard Fortran in F77. -John] -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.