char[] == null

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 19 07:36:46 PST 2015


On 11/19/15 3:30 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> On Wednesday, November 18, 2015 22:15:19 anonymous via Digitalmars-d-learn wrote:
>> On 18.11.2015 22:02, rsw0x wrote:
>>> slices aren't arrays
>>> http://dlang.org/d-array-article.html
>>
>> The language reference/specification [1] uses the term "dynamic array"
>> for T[] types. Let's not enforce a slang that's different from that.
>>
>>
>> [1] http://dlang.org/arrays.html
>
> Exactly. T[] _is_ a dynamic array. Steven's otherwise wonderful article on
> arrays in D ( http://dlang.org/d-array-article.html ) made the mistake of
> calling the buffer that T[] points to on the GC heap (assuming that even
> does point to the GC heap) the dynamic array. And per the language spec,
> that's not true at all.

It was not a mistake :) It's how I still think of it. The spec is 
confusing, and my terminology, IMO, is a much more consistent (and 
accurate) way to think of it.

-Steve


More information about the Digitalmars-d-learn mailing list