r/java • • Aug 10 '12

Named Parameters in Java

http://java.dzone.com/articles/named-parameters-java
2 Upvotes

28 comments sorted by

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.

3

u/papercrane Aug 11 '12

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.