[phobos] I think we need to make an emergency release
Andrei Alexandrescu
andrei at erdani.com
Thu Aug 26 00:32:14 PDT 2010
On 8/25/10 14:54 PDT, Steve Schveighoffer wrote:
> Well, I didn't find any cases requiring that in std.format or std.stdio, but
> they were mostly in unittests. Do you have a better example? Note that
> performing things like builtin appends on an array allocated by Appender are not
> a good idea, since appender completely ignores and does not update the stored
> length properly.
Agreed.
> Even an explanation of what you plan to do with the data at the same time you
> are appending would be good in lieu of an example. Maybe we can find a better
> design, or provide an unsafe function to get a reference to the GC-allocated
> array reference for those who want to live on the edge. I just dislike the
> *requirement* of stepping into unsafe territory just to use Appender. It seems
> to go against the spirit of most of Phobos. IMO the default should be the safe
> way.
I think it's fine to require people who use Appender to re-read the
string after having used it. So feel free to proceed with your design.
Andrei
More information about the phobos
mailing list