Enum

Part of speech: noun

Pronunciation: /ˈinʌm/

Definitions

  1. A defined collection of named constants used in programming to represent related values
  2. A set of named identifiers grouped together to define a variable type with limited possible values
  3. A data structure consisting of a fixed list of named values used for categorization in computer code

Etymology: "Enum" is a clipping of "enumeration," shortened to its first four letters. The clipped form took on a specific technical sense in the C programming language, where it names a user-defined type whose values are drawn from a fixed list of named constants. Programmers in C and its many descendants use it to replace bare numbers with readable labels, so that a variable describing a day of the week or a traffic light colour can only hold one of the permitted names. The word's original sense, from the full "enumeration," is simply the act of counting or listing items one by one. The clipping keeps that root idea of listing, but narrows it to a single kind of list: a closed set of allowed choices. The source does not provide a first-use date, so the term's exact arrival in programming is best traced to the C language itself and the later languages that adopted its approach.