What is the recommended dynamic array type in D? So far I found Array (specifically Array!string, as I need a dynamic array of strings), but my example program crashes:

https://gist.github.com/ivoras/2d7737c214c3dc937c28

The crash is at line 20:

core.exception.AssertError@/usr/include/dmd/phobos/std/container/array.d(334): Assertion failure
----------------
./markov() [0x80fbfd1]
./markov(uint std.container.array.Array!(immutable(char)[]).Array.Payload.insertBack!(immutable(char)[]).insertBack(immutable(char)[])+0x6f) [0x80fa997] ./markov(uint std.container.array.Array!(immutable(char)[]).Array.insertBack!(immutable(char)[]).insertBack(immutable(char)[])+0x36) [0x80fa866]
./markov(_Dmain+0x167) [0x80d7ce7]

This is on DMD32 D Compiler v2.067.1

Reply via email to