On Monday, 31 August 2015 at 21:29:09 UTC, anonymous wrote:
On Monday 31 August 2015 23:09, Minas Mina wrote:
I have started a series of tutorials in D.
This is my latest blog post, which is about dynamic arrays:
http://minas-mina.com/2015/08/31/dynamic-arrays/
Constructive criticism is welcome.
"Dynamic arrays are allocated on the garbage collected heap"
"Dynamic arrays can be sliced"
These are not wrong, but maybe a little bit misleading.
Static arrays and pointers can be sliced, too. And a slice of a
static array or pointer is ... dramatic pause ... a dynamic
array that doesn't necessarily refer to the GC heap.
I prefer the term "slice" to dynamic array. Because it's an
unfamiliar term it helps prevent confusion for people who are
used to what other languages call dynamic arrays.