What do you think of the two definitions
(1) Functional (a type is an algorithm description)
(2) Conceptual (A type embodies a concept in the program)
And I think I am missing one:
(3) A type implies a set of operations allowed with it.
#1: Ironically, I'm not sure how this would apply to a function type or
an incomplete type.
I suppose for a function type, the algorithm could describe how
arguments are passed, given a calling convention.
Using "functional" might confuse a reader who might naively try to tie
"function type" to #1 while developing their understanding, even though
I doubt that's your intention.
#2: Sure. I'm not sure that that's a _distinguishing_ characteristic of
"type," though. I think there are a few other things which also embody
a concept in a program, including values.
enum fruit { apple, orange, banana, grapefruit };
#3: I like this one more than #1 and #2.
A type is an attribute of
every expression, so operators can require certain types and/or can
behave in a particular manner, depending on the types of their operand
expressions.
"Type" is such a generic notion, in general, that to pin it down for
meaning in C, perhaps you'd have to build up some predicates which can
be said to be true or sometimes true of "type."
builtin, declared_where, declared, defined_where, defined,
function_or_object, complete_or_incomplete, qualifiers, qualified, size,
has_size, alignment, has_alignment, names_and_aliases, is_named, etc.
A type can also be [ab]used to accomplish other things, such as forcing
diagnostic messages or being used with 'sizeof' merely to carry a
constant value around.