The new, new phobos sneak preview

Alan Knowles alan at akbkhome.com
Mon Apr 6 18:55:16 PDT 2009


Denis Koroskin wrote:
> On Tue, 07 Apr 2009 03:34:37 +0400, Alan Knowles <alan at akbkhome.com> wrote:
> 
>> Really Sweet,
>>
>> Any chance of fixing one of my pet peeves of std.stream
>> writeLine() - using platform dependant line endings
>>
>> Almost all the socket work I've done with this has made it a rather 
>> annoying pointless method (as it's totally non-portable).  perhaps 
>> implementing
>> writeCR() writeLF() writeCRLF(), then letting writeLine call them, 
>> dependant on which platform would be better?
>>
> 
> write(text, '\r');
> write(text, '\n');
I normally end up doing
writeString(text ~ "\r\n");

as the polymorphism of write is a blessing and a curse, I've had a few 
really annoying bugs  occur by sending the wrong type to write()...

hence writeCRLF - etc. seemed alot clearer

> 
>> I guess in-line comments in the manual are a bit outside your scope at 
>> present.
>>
>> Anyway great work.
>> Regards
>> Alan
>>
>>
> 
> 



More information about the Digitalmars-d mailing list