Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the (official) term for a type's type?

I'm writing an application using Roslyn to syntactically and semantically analyse C# source code. For each type defined in the source code being analysed, I would like to store whether it's a reference type (a class), a value type (a struct) or an interface.

What's the appropriate/official term for a type's type?

Example:

class A
{
    //This type's type (A's type) is 'class' (i.e. a reference type).
}
like image 244
lesderid Avatar asked Dec 01 '12 17:12

lesderid


People also ask

What are the other names for types?

Some common synonyms of type are character, description, kind, nature, and sort. While all these words mean "a number of individuals thought of as a group because of a common quality or qualities," type may suggest strong and clearly marked similarity throughout the items included so that each is typical of the group.

What do you call a type of person?

species. noun. informal a type of person described according to a particular aspect of their character.

What does specimen type mean?

Definition of type specimen : a specimen or individual designated as type of a species or lesser group and serving as the final criterion of the characteristics of that group.


2 Answers

If you want to know the official name, look into the official source: the C# language specification. Quoting from there (§1.3 Types and variables; emphasis mine):

There are two kinds of types in C#: value types and reference types. […]

C#’s value types are further divided into simple types, enum types, struct types, and nullable types, and C#’s reference types are further divided into class types, interface types, array types, and delegate types.

Then there is a table that describes those groups of types as category, and also this quote:

Five of C#’s categories of types are user-definable: class types, struct types, interface types, enum types, and delegate types.

Although later (in §4 Types):

The types of the C# language are divided into two main categories: Value types and reference types.

To sum up, the specification calls them categories of types, although its usage of that term is not very consistent.

like image 185
svick Avatar answered Sep 22 '22 13:09

svick


In type theory, the type of a type is usually called its kind. That primarily describes the form of parameterisation of a type, although it can be used for other classifications, too. But I'm not sure whether it applies naturally to the sort of classification you are referring to here. It seems that C# does not have an "official" term for that either.

like image 44
Andreas Rossberg Avatar answered Sep 20 '22 13:09

Andreas Rossberg