A programming language entity that supports all operations generally available to other entities, including being passed as arguments, returned from functions, assigned to variables, and created at runtime. These entities have no restrictions on their use.
The term borrows from political science, where 'first-class citizen' refers to full membership rights in a society. It was adopted in programming to describe language features with full privileges, contrasting with restricted or second-class features.
First-class citizens in programming are like VIP members who can go anywhere and do anything - functions that can be stored in variables, passed around like data, and created on the fly! This is why JavaScript is so flexible - functions are first-class, so you can treat them like any other value.
Legal term from citizenship law, which historically excluded women from full civic rights. When applied metaphorically to programming, it retains hierarchical framing ('citizen' vs. non-citizen status).
Prefer 'first-class value' or 'first-rank construct' to avoid importing citizenship-based hierarchy.
["first-rank construct","first-class value","primary language construct"]
Complete word intelligence in one call. Free tier — 50 lookups/day.