concrete type
An actual type with its own data, such as string or a Target struct, as opposed to an interface that only describes behaviour.
In more detail
A value stored in an interface still has a concrete type underneath, which a type assertion or type switch can recover. A common guideline is to accept interfaces as parameters but return concrete types.
Related terms
- interface — A named set of member signatures that a type promises to implement, with no state of its own.
- type assertion — An expression such as value.(string) that gets the concrete value out of an interface, if it really holds that type.
- interface value — A value held in an interface variable, which carries two parts: the concrete type it really is and the value itself.
Taught in
- Interfaces and Why They Are Implicit — Concurrent Systems Programming with Go
- Type Assertions and the Empty Interface — Concurrent Systems Programming with Go
- Streams and the io Package — Concurrent Systems Programming with Go