first-class citizens

In computer science, a "first-class citizen" (or first-class object) refers to an entity—such as a function, data type, or object—that supports all the operations generally available to other entities within a programming language. These operations typically include being passed as an argument, returned from a function, modified, and assigned to a variable. The term was coined by British computer scientist Christopher Strachey in the 1960s, utilizing a metaphor based on societal status where specific groups hold full rights and privileges while others do not.

The term is widely used and understood in technical fields, but it has become a subject of debate regarding inclusive language. Those who continue to use the term view it as a harmless, established industry standard that concisely describes a specific technical capability. Conversely, critics argue that the metaphor derives its meaning from real-world discrimination, segregation, and political disenfranchisement. Because the term relies on the existence of a "second class" to have meaning, some organizations and style guides recommend replacing it with language that describes the functionality without invoking social hierarchies.

Example:
"Because functions are first-class citizens in this language, you can pass them as arguments to other functions."

Example:
"We need to ensure that accessibility is treated as a first-class citizen during the design phase, rather than an afterthought."

82%
Tap for details

Top Explanations

Alternatives

Loading alternatives...