Talk:Data class smell

From CSSEMediaWiki
Jump to: navigation, search

Regarding Scott Parlane's question: "Have you tried types? Are you using the right language?" Perhaps you could clarify what you mean by types in this context. Do you mean some sort of struct? If so, what really is the difference between a struct and a class in this context. I do believe there should be a difference between classes/objects and value types, but in current mainstream OO languages that I am aware of, there isn't really support for this functionality. I guess C#'s structs are similar in a sense, but then you just end up with a data struct, which has the same issues (or non-issues) as a data class. If you know a language which supports this nicely, do share :-) Having said that, personally I see nothing wrong with data classes as long as they don't violate Model the real world, Keep related data and behavior in one place, and other maxims. --Lukas Korsika 00:37, 21 October 2010 (UTC)

Personal tools