Ruby and Python

Darren New dnew at san.rr.com
Mon Nov 20 12:43:45 EST 2000


graham 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?

No. C has first-class pointers to functions. 

You can't treat a function as data at runtime in C. You can't inspect it,
copy it, assign it to a variable, or pass it or return it as an argument to
a function.

Function pointers are not the same as functions.

-- 
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST).  Cryptokeys on demand.



More information about the Python-list mailing list