What is the structure of D arrays?

Don nospam at nospam.com
Sat Dec 26 22:30:04 PST 2009


Ashok wrote:
> Don wrote:
>> Ashok wrote:
>>> Sean Kelly wrote:
>>>> Ashok Wrote:
>>>>
>>>>> Actually, I have another question before the one in the subject
>>>>> line: How many types of arrays are there in D? THEN, I would like
>>>>> to know their layout/structure in memory.
>>>> There's one type, and its structure is described in the ABI:
>>>>
>>>> http://www.digitalmars.com/d/2.0/abi.html
>>> How wide is length? And really? There's only one array type? D's age
>>> showing!
>> Dynamic arrays are internally just a pointer and a length, so there
>> only needs to be one structure.
> 
> I rest my case. 

I'm intrigued. What would you expect?




More information about the Digitalmars-d mailing list