Pointers - Is it safe to point to invalid memory?
0xEAB
desisma at heidel.beer
Sat Aug 16 23:42:04 UTC 2025
On Saturday, 16 August 2025 at 15:44:45 UTC, Richard (Rikki)
Andrew Cattermole wrote:
>> Source: Programming in D book, page 432, chapter 68.8
>> Quote: It is valid to point at the imaginary element one past
>> the end of an array.
>
> That is not the spec, the book is wrong.
IMHO the book is *not* wrong but rather vague.
What — I think — the book tries to convey is that you can create
a zero-length slice outside of the “range” of the original slice.
More information about the Digitalmars-d-learn
mailing list