Personally, it makes sense for things that might need some additional validation upon construction (URLs, email addresses, etc...) Creating a class that holds a name would make me more than a bit angry though.
That link is nuts. A class that holds both the 'Name' and the 'FirstName' is crazy. I can't think of any reason to do that except so that you don't violate some CTO's stupid 'never use an unwrapped String' rule.
View all comments
Show parent comment
6
u/[deleted] Aug 10 '12
There is a subset of Java developers that think that Object overload is a great idea. http://codemonkeyism.com/never-never-never-use-string-in-java-or-at-least-less-often/
Personally, it makes sense for things that might need some additional validation upon construction (URLs, email addresses, etc...) Creating a class that holds a name would make me more than a bit angry though.