August 11 Learn » Re: Do you have a better way to remove element from a array? | |||
|---|---|---|---|
| |||
...index); // return a new container // v.s. aa.remove(key); // return bool (if it's... | |||
August 11 Issues » [Issue 10959] std.algorithm.remove is highly bug-prone | |||
|---|---|---|---|
| |||
...index); // return a new container // v.s. aa.remove(key); // return bool (if it's... | |||
July 25 Issues » [Issue 24682] [next edition] Require named arguments in certain circumstances | |||
|---|---|---|---|
| |||
...update` is a perfect example of this:
```
aa.update(
"key",
() => 0,
(int a){},
);
```
This is... | |||
July 22 General » Re: _aaApply2 | |||
|---|---|---|---|
| |||
...foreach (v; aa)` is supposed to run over values and `foreach (k, v; aa)` over... | |||
July 22 General » Re: _aaApply2 | |||
|---|---|---|---|
| |||
...following compiles:
```d
void main() @nogc
{
int[string] aa;
foreach (k, v; aa)
assert(v);
}
```
| |||
July 22 General » Re: _aaApply2 | |||
|---|---|---|---|
| |||
...use this interface in user code too: aa.byKeyValue(). The non-range interface is really... | |||
July 22 General » Re: _aaApply2 | |||
|---|---|---|---|
| |||
...doesn’t really support key–value pair iteration. An AA can be iterated by values or keys... | |||
July 21 General » Re: _aaApply2 | |||
|---|---|---|---|
| |||
Probaly history, ranges were d2, aa's in d1 look basically the same https://digitalmars... | |||
July 21 General » _aaApply2 | |||
|---|---|---|---|
| |||
...Is really there any reason for a `foreach` over an AA not to be `nothrow`? | |||
July 19 Issues » [Issue 7444] Require [] for array copies too | |||
|---|---|---|---|
| |||
...dynamic array. Another issue is with an AA of static array key type: https://forum... | |||
Copyright © 1999-2021 by the D Language Foundation