Slices and Dynamic Arrays
Seb
seb at wilzba.ch
Mon Jan 1 11:11:44 UTC 2018
On Monday, 1 January 2018 at 02:10:14 UTC, Jonathan M Davis wrote:
> On Sunday, December 31, 2017 14:49:40 Tony via
> Digitalmars-d-learn wrote:
>> On Sunday, 31 December 2017 at 14:24:40 UTC, Jonathan M Davis
>>
>> wrote:
>> > [...]
>>
>> The DLang Tour also uses the term slice to refer to T[].
>>
>> "The type of arr is int[], which is also called a slice."
>>
>> "A slice consists of two members - a pointer to the starting
>> element and the length of the slice:"
>
> Presumably, because whoever wrote that preferred the
> terminology used in the D Slices article. Regardless, it's not
> wrong to call them slices. It's just less precise, since the
> term slice refers to more than dynamic arrays.
>
> The DLang Tour should probably be fixed to use the term dynamic
> array though.
>
> - Jonathan M Davis
Editing a page is just one click away - there is an edit button
on the top. Any improvements are always welcome!
More information about the Digitalmars-d-learn
mailing list