print function

ixid via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 3 16:40:55 PST 2016


On Thursday, 4 February 2016 at 00:30:03 UTC, cym13 wrote:
> On Thursday, 4 February 2016 at 00:23:07 UTC, ixid wrote:
>> It would be nice to have a simple writeln that adds spaces 
>> automatically like Python's 'print' in std.stdio, perhaps 
>> called print.
>
> Sounds way too redundant to me.

Normally you'd be right but printing out data is such a common 
thing, especially for beginners. It's the kind of thing that can 
make their early experience of a language a lot more positive.

writeln(a, " ", b, " ", c, " ", d);

Is very clunky. Programming languages are like cereal, you need 
sugar to get the kids hooked.


More information about the Digitalmars-d-learn mailing list