Etymology of type cast [closed]

To cast something is (among some other senses) to make it to fit a particular shape (using a mould) or to have someone play a particular rôle.

Cast in computing uses these senses metaphorically in either changing an objects type or treating an object of one type as being of another type. It can then be seen as fitting a particular mould, or playing a particular rôle. (Neither sense is the single source of the metaphor, it worked both ways from the beginning).

Typecast in all its senses comes from type + cast. Since the sort of casting one has in programming deals with types it follows from the above naturally.


Since we haven't found any authoritative etymology of the programming term, we have to guess where it came from. I would guess, given programmers' love of puns and joke terms, that "cast" came after the term "type", and resulted from "typecast". Whether that was based on the printer's definition or the actor's definition may be unknowable.