So, to print or not to print?

ZombineDev via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 25 23:06:12 PDT 2016


On Monday, 25 April 2016 at 19:35:04 UTC, Andrei Alexandrescu 
wrote:
> https://github.com/dlang/phobos/pull/3971
>
> Walter and I were talking this morning that there should be a 
> high barrier of entry for one-liners in Phobos. The "print" 
> function is technically a one-liner (i.e. writefln with the 
> appropriate format string). On the other hand, it may be 
> convivial enough to warrant inclusion, and saves us from 
> embarrassing things such as producing meaningless output when 
> numbers are printed together.
>
> There's been a bit of churn in the PR comments regarding the 
> utility of "print", and discussion diverged into other 
> functions such as "dump" etc. Keeping it on topic: any strong 
> cons and pros regarding the function? I want to either merge or 
> close the PR and move on.
>
>
> Thanks,
>
> Andrei

If it was available today, I would certainly use it for more 
convenient debugging, however the version I proposed [1] seems 
more useful to me.
Should I make a PR?

[1]: 
https://github.com/dlang/phobos/pull/3971#issuecomment-208058229


More information about the Digitalmars-d mailing list