Appender and CTFE

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Mar 3 09:03:04 PST 2011


On 3/3/11 10:54 AM, kenji hara wrote:
> Even without performance issue, Appender is necessary because it
> configures output range.
>
> Currently std.array.put does not allow empty array as its argument.
> int[] arr = [];
> arr.put(1);  // invalid. this does not means appending.
>
> Therefore building an array its length is not known beforehand
> requires Appender.
>
> Kenji

Agreed. I was mostly hoping about implementation simplification.

Andrei


More information about the Digitalmars-d mailing list