5
$\begingroup$

In particular, was there any kind of implementation at the time Christopher Strachey wrote Fundamental Concepts in Programming Languages?

In that work, Strachey lists Ad Hoc and Parametric polymorphism as the two main classes of polymorphism. But while examples of limited ad hoc polymorphism can be found in languages at that time, I can't find any examples of contemporary languages genuinely implementing parametric polymorphism. The IFIP Working Group produced a proposal for parametrised type constructors in Algol 68 but it was never implemented.

According to The main features of CPL, CPL had the general type. At the time the article was written, this was just a placeholder indicating the expectation that some variety of runtime polymorphism would be added later. The most recent version of the manual that I can find describes only ad hoc polymorphism (operator overloading and type-casting) and gives no indication that the general type was intended for anything other than that. I've found claims that CPL had parametric polymorphism but no evidence. The FCPL lecture notes describe what looks like syntax for algebraic data types that might be parametric, but that detail isn't covered and in any case this is syntax which it says will "probably be adopted in CPL" (and there's no evidence that it or anything like it ever was). Of course, it doesn't help that the CPL compiler wasn't implemented till around 1970, and the project abandoned a few years later.

Was Strachey describing contemporary practice at all? Or was this largely a summary of academic thinking and his ambitions for CPL?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.