valtyper
Valtyper are a concept in programming that describes data types whose values are stored directly in variables rather than as references to heap-allocated objects. In languages that distinguish value types from reference types, valtyper exhibit value semantics: assigning one variable to another copies the entire value, and changes to one variable do not affect others. They typically have a deterministic memory layout and do not require dereferencing to access their contents, which can improve locality and performance.
Common examples of valtyper include primitive numbers (integers, floating-point numbers), booleans, and character types. Many languages
In contrast, reference types store references to objects allocated on the heap, and copying a reference shares
Language-specific notes: in C#, value types include primitives and the struct type; they can be boxed to