News for hackers. Stuff that matters.
Re:A Dangerous Obsession with Primitives by ralfd on Thursday May 31, 2012 @11:21AM (#4048452)
I also don't quite see how a "value object" would helped (or much differed) there?
Re:A Dangerous Obsession with Primitives by swanson on Thursday May 31, 2012 @11:29AM (#4048510)
The main "win" would be to keep the logic for converting between units within the Carbs class. Otherwise every screen in the app is going to have to know that the integer value needs to be converted before displaying it.
Re:A Dangerous Obsession with Primitives by cpeterso on Thursday May 31, 2012 @02:10PM (#4049458)
Value objects are strongly (and semantically) typed.