Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
6 user(s) are online (5 user(s) are browsing encyclopedia)

Members: 0
Guests: 6

more...
partner

First-class object

In Computing, a first-class object (also -value, -entity, -citizen), in the context of a particular programming language, is an entity which can be used in programs without restriction (when compared to other kinds of objects in the same language). Depending on the language, this can imply:

  • being expressible as an anonymous literal value
  • being storable in program variable
  • being storable in data structures
  • having an intrinsic identity (independent of any given name)
  • being comparable for equality with other entities
  • being passable as a parameter to a procedure/function
  • being returnable as the result of a procedure/function
  • being constructable at Runtime
  • For example, in C programming language, it is not possible to create new function (programming)s at runtime, whereas other kinds of object can be created at runtime. So functions in C are not first-class objects; sometimes they are called second-class objects because they can still be manipulated in most of the above fashions (via function pointers). Similarly, string (programming)s are not first class objects in Fortran as it is not possible to assign them to variables, whereas numbers can be so assigned.

    = See also =

    First class function