eliminate writeln et comp?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Mar 17 13:57:40 PDT 2009


Jarrett Billingsley wrote:
> On Tue, Mar 17, 2009 at 11:35 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Hey all y'all,
>>
>>
>> Here's another nice bicycle shed discussion. During the recent discussion
>> about globals being harmful, Walter told me something that made me think. I
>> said, hey, there are things that are global - look at stdout. He said, well,
>> that's a bad thing. He then argued that it would be better and cleaner to
>> write:
>>
>> stdout.writeln("Hello, world");
>>
>> instead of the current:
>>
>> writeln("Hello, world");
>>
>> On one hand, I agree with Walter. On the other, I want to avoid the
>> phenomenon of the all-too-long "Hello, world" example.
>>
>> What do you think?
> 
> Keep writefln.  You're only going to be using it when (1) you're doing
> debugging, when you want it short, and (2) you're writing a simple
> console program.  There's always dout.writefln when you need more
> power.

Is dout in the std.stream thing? That entire framework is due for 
retirement.

Andrei



More information about the Digitalmars-d mailing list