Article View: comp.lang.misc
Article #2618Re: On whether C has first-class composable functions
From: Ozan Yigit
Date: Tue, 08 Jan 1991 18:27
Date: Tue, 08 Jan 1991 18:27
57 lines
3105 bytes
3105 bytes
In article <4408:Jan421:44:3391@kramden.acf.nyu.edu>
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <442@data.UUCP> kend@data.UUCP (Ken Dickey) writes:
>> There is an important property of "first-class" objects missing here.
>> A first-class object does not have to be named.
>Do you have a reference? As always, I'm doing my best to use standard
>terminology; I just haven't seen any references that demand a syntactic
>restriction like that.
There may be many references, though I am not sure if that will that make
any difference whatsoever. It appears that you would prefer to argue than
to look them up.
Here is one: William Clinger, Semantics of Scheme, February. 1988, BYTE,
pp. 221-227
[Will Clinger is an author of MacScheme, one of the nicest [I think]
implementations of this language.]
First-Class Objects
All Scheme objects are endowed with certain inalienable rights:
o Objects have the right to remain anonymous.
o Objects have an identity that is independent of any names by
which they may be known
o Objects can be stored in variables and in data structures without
losing their identity
o Objects may be returned as a result of a procedure call
o Objects never die.
All scheme objects are first-class citizens of the language. In most
programming languages, the only first-class objecst are those that can
easily fit into a machine register, like numbers, booleans, and
pointers. While numbers may be used without being given names,
procedures may not; while characters and pointers may be stored,
strings may not; while booleans live forever, vectors may die when the
procedure that created them returns. Thus, Scheme is very unusual in
this respect. In fact, Scheme is the most widely used procedural
language in which all objects are first class.
Though objects never die, they may become inaccessible and therefore
useless. Implementations of Scheme and other advanced languages may in
fact reclaim the storage occupied by an object, provided they can prove
that the object will never again be used. Algorithms for performing
these proofs are known as garbage-collection algorithms.
... next !!
oz
---
who pays any attention to the syntax | Internet: oz@nexus.yorku.ca
of things will never wholly kiss you... | Uucp: utai/utzoo!yunexus!oz
-- e. e. cummings | P:1+ (416) 736 5257 x 33976
Technical Details
Message-ID:
<20021@yunexus.YorkU.CA>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!ozReferences:
<1990Dec29.110202.3862@mathrt0.math.chalmers.se> <17557:Jan219:22:3191@kramden.acf.nyu.edu> <442@data.UUCP> <4408:Jan421:44:3391@kramden.acf.nyu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!oz From: oz@yunexus.yorku.ca (Ozan Yigit) Newsgroups: comp.lang.misc Subject: Re: On whether C has first-class composable functions Keywords: first-class, scheme Message-ID: <20021@yunexus.YorkU.CA> Date: 8 Jan 91 18:27:19 GMT References: <1990Dec29.110202.3862@mathrt0.math.chalmers.se> <17557:Jan219:22:3191@kramden.acf.nyu.edu> <442@data.UUCP> <4408:Jan421:44:3391@kramden.acf.nyu.edu> Sender: news@yunexus.YorkU.CA Organization: York U. Communications Research & Development Lines: 57