[Issue 10959] std.algorithm.remove is highly bug-prone
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 11 06:01:02 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=10959
mw <mingwu at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mingwu at gmail.com
--- Comment #15 from mw <mingwu at gmail.com> ---
Hit this one today,
Has `removeAt` or `removeAtIndex` be added to the std lib?
BTW, for associative array, `remove()` is in-place; but here for
std.algorithm.mutation.remove, one need to do
```
array = array.remove(index); // return a new container
// v.s.
aa.remove(key); // return bool (if it's removed)
```
This in-consistence is really bad.
--
More information about the Digitalmars-d-bugs
mailing list