Wait, what? What is AliasSeq?
Tofu Ninja via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 9 13:57:51 PDT 2015
On Thursday, 9 July 2015 at 19:19:42 UTC, Walter Bright wrote:
> On 7/9/2015 12:56 AM, deadalnix wrote:
>> Several of which actually use linked list for list and
>> probably shouldn't
>> provide random access.
>
> Yes. Consider:
>
> for (int i = 0; i < list.length; ++i)
> sum += list[i];
>
> If indexing was allowed on a list, this would seem like
> perfectly reasonable code.
In many languages that is perfectly reasonable because list does
not equal linked list. Its almost as if a list is an abstract
concept and does not mean any one definite data structure, hmmm
who wuda thunk that...
More information about the Digitalmars-d
mailing list