On Monday, 21 October 2013 at 16:22:29 UTC, Krzysztof Ciebiera
wrote:
I understand slices now and I don't find it consistent with "no
shoot in the foot by default" statement.
I agree. The pitfalls are well understood, yet everybody seems to
love them. Ok, compared to C array they are an improvement due to
bounds checking. If the elements are const or immutable (string)
everything is fine, but write+append is basically
implementation-defined behavior.
Once there is a proper std.collections, I will probably adapt my
tutorial to recommend a safe alternative (ArrayList?).