[Issue 9326] writeln to simply show pointed data
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 16 03:12:00 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9326
--- Comment #2 from bearophile_hugs at eml.cc 2013-01-16 03:11:59 PST ---
(In reply to comment #1)
Thank you for your comment.
> I don't think that stuffing various debugging trickery into writeln is a good
> idea.
I keep hearing similar comments since few years ago I asked for a better
printing of associative arrays and arrays in D. But once you give D programmers
such better printing (thanks to Hara work), they seem happy and unwilling to go
back to a more limited printing.
It's not a trick, showing what a pointer points to is printing of a basic
built-in data structure of the language.
Probably I got spoiled by modern dynamic languages, that being often used on
the REPL, enjoy having good default printing.
If you think this enhancement request is not a good idea, you must explain why.
I have explained why it's a handy thing to have.
(The implementation of this feature requires the formatting function to keep a
set of already seen pointers. For simplicity I think a built-in associative
array of void* is enough).
> What about a dedicated primitive that may (by default!) use more convenient
> formating fot this purpose?
Once the improved format() is implemented in Phobos, what's the point of
artificially restricting the usefulness of writeln()?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list