A primitive data type is the basic data type that a language offers.
A primitive type is a type without any substructure. It is then data:
Most of the time:
They are also scalar.
Most primitive data type fall under one of this category:
Others:
Primitive obsession is the overuse of primitive types to represent higher-level concepts.
Example with a bounding box represented with:
vector<pair<int, int>> polygon = ...
pair<pair<int, int>, pair<int, int>> bounding_box = GetBoundingBox(polygon);
int area = (bounding_box.second.first - bounding_box.first.first) *
(bounding_box.second.second - bounding_box.first.seco
Polygon polygon = ...
int area = polygon.GetBoundingBox().GetArea();
See Code Health: Obsessed With Primitives?