[Issue 23432] document when array capacity is zero and capacity performance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 23 18:02:32 UTC 2022


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@ntrel created dlang/dlang.org pull request #3445 "[spec/arrays] Improve
capacity docs" fixing this issue:

- [arrays] Improve capacity docs

  Remove sentence about appending to a static array.
  Add note about static array capacity being for generic code.
  Mention capacity is zero if not pointing to GC (array) memory.
  Extend example and explain it afterwards.
  Explain when array length is reduced, capacity will be zero.
  Mention performance impact of capacity.

  Fix Issue 23432 - document when array capacity is zero and capacity
performance.

https://github.com/dlang/dlang.org/pull/3445

--


More information about the Digitalmars-d-bugs mailing list