The more interesting question

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Tue May 15 10:29:50 PDT 2012


>> On Tue, May 15, 2012 at 9:16 PM, Alex Rønne Petersen <alex at lycus.org>wrote:
>> Nope. write* perform GC allocation.

1. Give me the top 3 use cases, where GC allocation is intolerable when
writing to an output stream.
2. writef and friends could get cousins like nogcwritef and nogcwritefln.
(see comments beloaw)
3. GC can be turned off and gc-allocated memory can be GC.freeed.
4. printf could get wrapped to take d-strings by malloc-ing new buffers for
the c-strings if necessary.

>> On Tue, May 15, 2012 at 9:16 PM, Alex Rønne Petersen <alex at lycus.org>
 wrote:
>> You're assuming everyone uses Phobos. This is not the case.

I'm assuming everyone is sane, because Phobos is called "the standard
library" for a damned good reason. For those who don't - they're welcome to
use whatever they want and convert d-strings to c-strings any way they
choose if necessary.

-- 
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120515/70e9be62/attachment.html>


More information about the Digitalmars-d mailing list