Im trying to work out if generic programming was a functional programming feature which was then introduced into Java, C++ and C# or did the latter copy it from the functional programming languages like Haskell, Lisp, OCaml etc?

Google is giving me lots on what generic programming is, but not where it originated. All I can see is that Ada implemented it early on.

Would you class it as a functional programming technique?

3 Answers 3


Polymorphic data types had been around since early 1970s (with the introduction of ML language and Hindley-Milner algorithm).

A more generic form, Lisp macros, had been around since 1960s.


According to the Wikipedia article it stems from Ada and/or CLU (both of which are object oriented programming languages):

This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate when used,


Generic programming facilities first appeared in the 1970s in languages like CLU and Ada

  • After that bit it then describes that generic programming was useful for mathematical problems....... which sounded slightly functional?
    – user997112
    Nov 11, 2011 at 15:03
  • 2
    Why do you say that? Object oriented programming can solve mathematical problems, no? Besides, I can't find that sentence. If I search for "math" on that page, all that comes up is an unrelated sentence.
    – aioobe
    Nov 11, 2011 at 15:04
  • Lisp macros predate both of those references, I believe, and can certainly be used for C++-style generic programs. I don't know how much static typing these Lisps used, although the earliest one I used had strong dynamic typing. I don't know how much generic programming was actually done; much of the benefits of C++-style generics come from having a static type system. Nov 11, 2011 at 16:35
  • 2
    It's also worth nothing that Ada 83 does not fit most definitions of "object oriented" -- it wasn't really until Ada 95 that it got the usual object oriented features (especially inheritance). Nov 11, 2011 at 18:31

Like for many great ideas in computing, any "first" you can identify probably wasn't the actual first use. For example, Christopher Strachey discusses the idea (under the label "polymorphism") in his influential 1967 lecture notes without giving attributions so the idea is likely to have been well known by that time.

At that time, there was no great split between functional and object-oriented programming.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.