In the article Active Record vs Objects Bob Martin points out that:
- Object hide data and expose behavior
- Data structures expose data and has no behavior
He then continues to say
In languages like C++ and C# the struct keyword is used to describe a data structure with public fields.
To me it looks like he is using data structure as a synonym for struct and is saying we should use the struct keyword for data and the class keyword for implementing objects with behaviour. That sounds strange because mutable structs are evil and data in most systems need to change (it would mean most data are evil).
Could someone point out the flaw in my reasoning?