5 ms·
It's a really awful name. Is primitive obsession a good code smell or a bad code smell? And if code smell is a bad thing, and if primitive obsession is a good t
by rerdavies 3y ago
It's a really awful name. Is primitive obsession a good code smell or a bad code smell? And if code smell is a bad thing, and if primitive obsession is a good thing, wouldn't the code smell be lack of primitive obsession?
I don't mean to be pedantic. But it's quite exhausting trying to parse the meaning out of "primitive obsession is a code smell". It took me a while to figure out whether the author considered "primitive obsession" to be a good thing or a bad thing, not least because the they provided an example but not a definition.
- ddejohn 3y agoThe term "code smell" only ever has a negative connotation. The title of the article is also "Primitive Obsession — A Code Smell that Hurts People the Most" -- doesn't seem too difficult to parse...
- rerdavies 3y agoBut the solution being advanced is to prevent inheritance of primitive operators. Implying that Primitive Obsession is a good thing. Unless the author means "primitive type obsession". I imagine they did.