Inability to dup/~ for const arrays of class objects
Ali Çehreli
acehreli at yahoo.com
Wed May 29 23:12:00 PDT 2013
On 05/29/2013 10:54 PM, Maxim Fomin wrote:
> And this is a problem, because article about D slices encourages to call
> some raw memory (which almost never is directly manipulated and doesn't
> appear in source code) as a dynamic array, and dynamic array as a slice.
An array is simply consecutive elements in memory. There are two types
of arrays: static (aka fixed-length) and dynamic.
Slice is not an array itself: It is both an accessor to array elements
(static or dynamic) and a tool that can spawn a new dynamic array when
another element is appended to its view.
Documentations use "slice" and "dynamic array" synonymously because of
the latter semantics.
Ali
More information about the Digitalmars-d
mailing list