[phobos] I think we need to make an emergency release
Andrei Alexandrescu
andrei at erdani.com
Wed Aug 25 14:41:35 PDT 2010
On 8/25/10 14:39 PDT, Steve Schveighoffer wrote:
> ----- Original Message ----
>> From: Andrei Alexandrescu<andrei at erdani.com>
>> To: Discuss the phobos library for D<phobos at puremagic.com>
>> Sent: Wed, August 25, 2010 5:36:24 PM
>> Subject: Re: [phobos] I think we need to make an emergency release
>>
>> I needed Appender to be a reference type for std.format and std.stdio.
>> The point is to be able to compose a complex stream read into a sequence
>> of simpler reads. This is possible if you use one Appender throughout,
>> but I don't see why preclude people from appending output to their own
>> strings. It's not a difficult to implement feature (my convoluted code
>> notwithstanding), and it's useful. Why decide to not provide it?
>
> It is a reference type. There's only one pointer in the struct, that points to
> the GC-allocated private Data struct. Or maybe I didn't understand you?
I know it is a reference type (I was just explaining the change I
introduced). The issue with your appender is that it makes it impossible
for a user to append to an existing string and have the change reflected
at all times in the string.
Andrei
More information about the phobos
mailing list