directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse McConnell <jesse.mcconn...@gmail.com>
Subject Re: [Code Issues] Don't use toString() to pretty print
Date Mon, 31 Aug 2009 14:45:00 GMT
I am a fan of useful toString() representations of complex
objects...however I generally draw the line at deep information..

my rule of thumb is:

toString() - fine for state and context information about this object

dump() - fine for complex debugging/info for this object and other
objects it references

sometimes it handy to make it dump(PrintStream) so you can do
foo.dump(System.out);

cheers,
jesse

--
jesse mcconnell
jesse.mcconnell@gmail.com



On Mon, Aug 31, 2009 at 03:11, Emmanuel Lecharny<elecharny@apache.org> wrote:
> Alex Karasulu wrote:
>>
>> OK it's not that big of a deal for me, just a mere annoyance.  I've stated
>> my concerns and you remain adamant on yours.
>>
>
> Yeah. We don't have to agree on everything anyway :) Here, it's much more a
> matter of style than technical matter. As I have Joshua on my side ... ;)
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>

Mime
View raw message