http://d.puremagic.com/issues/show_bug.cgi?id=8384



--- Comment #12 from Vladimir Panteleev <thecybersha...@gmail.com> 2012-08-15 
13:56:00 PDT ---
I would like to stress out a point that I hope could clear up my view of the
logic that writeln/format should use.

Printing/formatting memory addresses is extremely rarely useful!

Except for some dirty debugging, I can't imagine a case where the user expects
that passing a pointer to something to format would yield the hex
representation of that address.

I believe that printing a pointer as a hex address should be the fallback,
last-resort behavior, if there is no better representation for the said type.
(This also allows discussion of calling toString() on struct pointers.)

For the rare case that the user intends to actually print a pointer, this is
easily accomplished by a cast to size_t and using the appropriate hex format
specifier.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to