Using primitive data types to represent domain ideas is code smell called Primitive Obsession. For example using string data type to represent human name - it is recomended to avoid this by defining domain specific value object with apropriate methods.
But what about pointers?
Is it not primitive obsession to use CItem* or shared_ptr instead of more domain specific (value) types like CItemHandle, CItemLink etc. ?
Aucun commentaire:
Enregistrer un commentaire