https://issues.dlang.org/show_bug.cgi?id=16269

Jon Degenhardt <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m

--- Comment #10 from Jon Degenhardt <[email protected]> ---
(Apologies for such a late comment, hope it's not disruptive.)

Would it make sense to consider including a 'reserve' capability with this
change? See https://issues.dlang.org/show_bug.cgi?id=2504.

Ensuring allocation could be seen as having a relationship with reserving an
amount of space. At the API level, it could possibly be done by adding an
optional argument to ensureAllocated that would reserve space. The con to this
approach might simply be that 'reserve' or setting the 'length' property would
be more consistent with other APIs already being used in D.

--

Reply via email to