first-class object
In programming, a "first-class object" is an entity that enjoys all the privileges of other entities, such as being dynamically created and passed as a parameter.
πΊπΈ US Voice:
π¬π§ UK Voice:
Definition
C1Programming
(technical)An entity that can be created at runtime, passed as a parameter, returned from a function, and assigned to a variable.
Example
- In JavaScript, functions are first-class objects, meaning they can be assigned to variables and passed around like any other value.
- Using first-class objects allows for more flexible and dynamic code.
Similar
Terms that have similar or relatively close meanings to "first-class object":
first classfirst-class citizensecond classword classclass act