1. A system comprising: a memory that stores code associated with a computer program; and a component coupled to the memory, the component configured to access the code, to identify a variable in the code and a modifier associated with the variable, the modifier designating that the variable is to be used for determining the identity of an object associated with the variable and for determining whether the object is equal to another object based on value semantics, and, responsive to identifying the variable and the modifier associated with the variable, to use the variable to determine the identity of the object associated with the variable and to determine whether the object is equal to the other object based on value semantics, the component being configured to use the variable to determine the identity of the object and to determine whether the object is equal to the other object based on value semantics by automatically overriding an Equals virtual method and a GetHashCode virtual method such that the overridden Equals virtual method and the overridden GetHashCode virtual method are implemented using the variable and satisfy a required contract associated with the virtual methods.