[Issue 9326] writeln to simply show pointed data

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 16 04:57:35 PST 2013


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



--- Comment #4 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-01-16 04:57:33 PST ---
(In reply to comment #2)
> (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.

What Kenji did was a better printing for ranges in general that is far more
powerful (and better integrated) then arrays.

> 
> 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).
> 

It's good that you answered it already: not everybody needs it yet it requires
more complex code to be pulled in for everybody. 

Dynamic languages doesn't ever consider cost-to-benefit ratio it seems.

-- 
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