Talk:Ordinal data type

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing  
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

Merge proposal[edit]

I propose to merge this article with Enumerated type, as it's content is not relevant enough for a separate one. Sae1962 (talk) 10:28, 29 March 2011 (UTC)

In programming languages, enumeration types exist in various forms, including ones that are intentionally not ordinal or cardinal.

Ordinality explicitly attributes the ability to order as a meaning and that for any element, it is the lesser, the same as or greater than any other element. In mathematics, ordinality also has with it the notion of being partially ordered versus completely ordered or linearly ordered and these also carry over into computer languages when dealing with ordinals.

Cardinality explicitly attributes a meaning of quantification.

Nominality explicitly attributes a meaning of identification, possibly unique. There is no suggestion of ordering or quantifying. Colors are an excellent example of nominals. Numbers on individual players in sports teams or amongst competetors in sports competitions are another. Serial numbers, assigned serially to assure uniqueness and possibly provide a means of determining other attributes, are not intended to convey ordering or quantification, only uniqueness in identification.

In programming languages, the principal reason for enumeration types is their nominality. Enumeration types may or may not posess an ordinal property. Even if a programming language's enumeration type's underlying representation could be ordered, since all binary representations ultimately can be, the ordering obtained that way might be arbitrary, utterly meaningless or, even worse, undefined and random from instance to instance. Also programming languages may sufficiently hide the underlying representation from the programmer such that having an even arbitrary, meaningless or undefined and potentially random order is difficult or impossible.

The principal attribute of enumeration types is their nominal property and the principal reason for their existance is the avoidance of so-called Magic Numbers and other ilk in software. I don't believe merging Ordinal data types with Enumeration types as though they are the same would be a Good Thing. Lind j a (talk) 00:22, 31 August 2012 (UTC)

I vote against merging. Yes, ordinal and enumerated are represented by binary patterns that can be re-interpreted as integer. But so are the character, boolean and pointer types. Of these only boolean is truly an enumerated type (but often defined with reserved keywords in programming languages). Still boolean and enumerated should be separate articles. Also, character is an kind of ordinal, still they too should be separate articles. Besides, a small article is not necessarily a bad article. David A se (talk) 22:58, 15 November 2012 (UTC)