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!
==Functions== {{main article|First-class functions}} Many programming languages support passing and returning function values, which can be applied to arguments. Whether this suffices to call function values first-class is disputed. Some authors require it be possible to create new [[function (programming)|function]]s at runtime to call them 'first-class'.{{citation needed|date=January 2022}} Under this definition, functions in C are not first-class objects; instead, they are sometimes called '''second-class objects''', because they can still be manipulated in most of the above fashions (via [[function pointer]]s). In [[Smalltalk]], functions (methods) are first-class objects, just like Smalltalk classes. Since Smalltalk operators (+, -, etc.) are methods, they are also first-class objects.
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)