Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
First-class citizen
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== The concept of first- and second-class objects was introduced by [[Christopher Strachey]] in the 1960s.<ref>Rod Burstall, "Christopher Strachey—Understanding Programming Languages", ''Higher-Order and Symbolic Computation'' '''13''':52 (2000)</ref><ref>Harold Abelson and Gerald Jay Sussman, ''Structure and Interpretation of Computer Programs'', 2nd edition, section 1.3.4 [http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-12.html#footnote_Temp_121 footnote 64] {{Webarchive|url=https://web.archive.org/web/20150309062836/http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-12.html#footnote_Temp_121 |date=2015-03-09 }}</ref> He did not actually define the term strictly, but contrasted real numbers and procedures in [[ALGOL]]: <blockquote>'''First and second class objects.''' In ALGOL, a real number may appear in an expression or be assigned to a variable, and either of them may appear as an actual parameter in a procedure call. A procedure, on the other hand, may only appear in another procedure call either as the operator (the most common case) or as one of the actual parameters. There are no other expressions involving procedures or whose results are procedures. Thus in a sense procedures in ALGOL are second class citizens—they always have to appear in person and can never be represented by a variable or expression (except in the case of a formal parameter)... <ref>Christopher Strachey, "[http://www.ics.uci.edu/~jajones/INF102-S18/readings/05_stratchey_1967.pdf Fundamental Concepts in Programming Languages]" in ''Higher-Order and Symbolic Computation'' '''13''':11 (2000); though published in 2000, these are notes from lectures Strachey delivered in August, 1967</ref></blockquote> [[Robin Popplestone]] gave the following definition: All items have certain fundamental rights. # All items can be the actual parameters of functions # All items can be returned as results of functions # All items can be the subject of assignment statements # All items can be tested for equality.<ref>R. J. Popplestone: The Design Philosophy of [[POP-2]]. in: D. Michie: Machine Intelligence 3, Edinburgh at the University Press, 1968</ref> During the 1990s, [[Raphael Finkel]]<ref>Finkel, R. ''Advanced Programming language Design'', p 73</ref> proposed definitions of second and third class values, but these definitions have not been widely adopted.<ref>{{cite web|title=About first-,second- and third-class value|author=Norman Ramsey|url=https://stackoverflow.com/a/2582804|work=stackoverflow.com|access-date=14 September 2013}}</ref>{{better source needed|date=November 2021}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)