eliminate writeln et comp?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Mar 17 13:58:46 PDT 2009
Max Samukha wrote:
> 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, ...)
(Not in the upcoming Phobos.)
Andrei
More information about the Digitalmars-d
mailing list