First class citizens in a programming language

The notion of “first-class citizen” or “first-class element” in a programming language was introduced by British computer scientist Christopher Strachey in the 1960s in the context of first-class functions.

  • They may be named by variables.
  • They may be passed as arguments to procedures.
  • They may be returned as the results of procedures.
  • They may be included in data structures.

Basically, it means that you can do with this programming language element everything that you can do with all other elements in the programming language.

It’s all about “equal rights”: you can do all of the above, with, say, integers, so why should any other thing be different?

comments powered by Disqus