eliminate writeln et comp?
Max Samukha
samukha at voliacable.com.removethis
Tue Mar 17 09:54:38 PDT 2009
On Tue, 17 Mar 2009 08:56:58 -0700, Sean Kelly
<sean at invisibleduck.org> wrote:
>Andrei Alexandrescu 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");
>
>But then stdout is still global :-) However, I do think an "fwritef"
>routine would be good to have--I tend to write to stderr as often as stdout.
writef recognizes if its first parameter is a stream. you can already
use writef(stderr, ...)
More information about the Digitalmars-d
mailing list