Implementing relationships using Affinity

  • Authors:
  • Stephen Nelson;David J. Pearce;James Noble

  • Affiliations:
  • Victoria University of Wellington;Victoria University of Wellington;Victoria University of Wellington

  • Venue:
  • Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

OO languages typically provide one form of object equality, known as reference equality, where two objects are equal only if they are the same object; two objects which are structurally identical are not considered equal. Thus, programmers who require a more refined notion of equality must define their own operator. Programmer-implemented equality operators tend to rely on informal notions of partial and temporal object immutability which are prone to error. This is a particular problem for objects used in collections which depend on equality. This paper discusses Affinity: an untyped, object-oriented language with a powerful equality operator based on EGAL [2] and support for object-keying and immutability. Affinity is designed to provide coherent and elegant support for object equality, reducing programmer burden and error potential.