Ruby and Python

Suchandra Thapa ssthapa at harper.uchicago.edu
Tue Nov 21 03:26:46 EST 2000


graham <graham73 at telocity.com> wrote:
>Jeremy Hylton
>> The normal definition of "first class" is an object that can be named
>> and treated as data at runtime.  A first class object can be bound to a
>> variable name, passed as an argument to a function, or returned from a
>> function.  The term has nothing to do with scoping rules.
>
>So by this definition C has first class functions. Does it?
>

    C doesn't let you create functions at run time and functions aren't
equivalent to data in C.  I agree with Jeremy on his definition of a
first class object.  Basically a first class object can be handled the 
same way data is.  
    I believe lisp has had first class functions since  fairly early in 
its inception however it did not have lexical scoping  and lexical closures 
until recently.  In fact, I think emacs lisp is still dynamically scoped.
I don't think anyone really thinks that lisp doesn't have first class
function however.


-- 
------------------------------------------------------------------
			    |
Suchandra Thapa             | "There are only two kinds of math books. 
s-thapaNO at SPAMuchicago.edu  | Those you cannot read beyond the first 
			    | sentence, and those you cannot read 
			    | beyond the first page."
			    |                       -C.N. Yang
------------------------------------------------------------------



More information about the Python-list mailing list