Just because it's a slow Thursday on this forum

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 11 13:38:42 PST 2016


On Thu, Feb 11, 2016 at 03:38:42PM -0500, Nick Sabalausky via Digitalmars-d wrote:
> On 02/11/2016 11:22 AM, H. S. Teoh via Digitalmars-d wrote:
> >
> >Fair enough.
> >
> >Personally, though, I find a bunch of comma-separated values very
> >unhelpful. It would be much better if they were labelled, e.g., if:
> >
> >	int x, y, z;
> >	dump(x,y,z);
> >
> >outputs:
> >
> >	x=1, y=2, z=3
> >
> >it would be much better than just:
> >
> >	1, 2, 3
> >
> >which is unclear which values belongs to which variable. Trivial to
> >figure out in this case, but it's not as obvious when interspersed
> >between other program output & debug messages. But maybe that's just
> >a matter of habit, and difference in personal debugging style.
> >
> 
> My understanding is that's the whole point of the "dump" function
> being discussed. Unless I misunderstood?

IMO `dump` is worthwhile but `print` seems little more than an alias for
`writefln`. I can't find enough justification to warrant `print`. (Next
thing you know, newbies will be asking why there's both `print` and
`write` that do the same thing except different.)


T

-- 
In order to understand recursion you must first understand recursion.


More information about the Digitalmars-d mailing list