Origin of the term "first-class object"

Erik Max Francis max at alcyone.com
Tue Nov 18 00:30:59 CET 2003

Rainer Deyke wrote:

> While you can't create new functions and unbound methods in C++ at
> runtime,
> you can take their address and pass that around as a first class
> object.

True, though that usually devolves into a semantic issue about whether
functions are first-class if you can only manipulate pointers to them. 
I usually say C has first-class functions if you squint.  C++ doesn't
have first-class bound member function pointers, as you point out, and
another obvious example in C++ is the lack of first-class classes -- a
feature in Python that is extremely powerful, since it almost makes the
"factory" pattern automatic in Python (the class object itself is just a
callable type that creates instances).

   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ 
\__/ And there inside our private war / I died the night before
    -- Sade

More information about the Python-list mailing list