The package dependency `emsi_containers` that can be found in
https://code.dlang.org/packages/emsi_containers might be a viable way to resolve the problem.



```
/+dub.sdl:
dependency "emsi_containers" version="~>0.7"
+/
import std;
void main(string[] args) @nogc
{
    import containers;
    DynamicArray!int arr;
    arr ~= 1;
    arr ~= 3;
    foreach (e; arr)
        printf("%i",e);
}
```

https://run.dlang.io/is/zD2zKg
#### Output

```
13
```

I keep on wondering if something like this would be applicable to be in the standard library of D Language in the future.

`DynamicArray!int arr;`
And as always, I find it frustrating to read a source code that includes `!` as template instatiation without seemingly obvious alternative way of handling it.

Reply via email to