I prefer #1. If the caller really cares about what she gets, she can call the explicit method.

-- Blake Sullivan

On 2/14/12 9:18 AM, Andy Schwartz wrote:
On Tue, Feb 14, 2012 at 11:33 AM, Blake Sullivan
<[email protected]>  wrote:
I would go with valueOfDisplayName().  I would actually add a displayName()
as well, just like we have name().
Sounds good, will do.

  I am not a fan of assuming that
toString() == displayName()
Er... two options here:

1. Leave toString() documentation/contract intentionally vague.
2. Document the current behavior (toString() == displayName()) as the
spec'ed/required behavior.

I was leaning towards #2 since folks out there might be relying on the
existing toString() behavior - ie. we could enshrine this as required
behavior in our contract.

Do you prefer #1?

Andy

Reply via email to