Primitive obsession
Refactoring

Primitive obsession

Introduction

Primitive obsession is a code smell. Primitive in this context refers to programming language primitive data types. Obsession refers to always using these data types to represent domain ideas.

The concept of primitive can be extended to include language base classes. Just because you can represent something as a String, an Integer, or even a Map does not mean you always should. Primitive obsession and a strongly typed language results in weak typing.
Read More