On 8/25/10 14:39 PDT, Steve Schveighoffer wrote:
----- Original Message ----
From: Andrei Alexandrescu<[email protected]>
To: Discuss the phobos library for D<[email protected]>
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
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to