Regarding std.array.Appender
Adam D. Ruppe
destructionator at gmail.com
Wed Feb 29 18:49:08 PST 2012
On Thursday, 1 March 2012 at 02:44:35 UTC, Jonathan M Davis wrote:
> True, but it can't do all of the other operations that array
> can do either.
Yeah, but the one operation it replaces, ~=, can be done
on an array.
If you're trying to convert array code to Appender for
speed, most likely you're going to be replacing a
bunch of ~= calls.
It's ok if the other op don't compile, but this one
really should. Appender, regardless of the internal
representation vs array is a speed optimization;
an implementation detail.
> It's an output range, not an array.
It's also an Appender, though. I think it is a little
silly to have an Appender to which you can't /append/.
(put is great too, don't get me wrong, but so is ~=).
More information about the Digitalmars-d-learn
mailing list