top | item 45493241

(no title)

sgsjchs | 4 months ago

But in C that's just syntax sugar for pointer math.

discuss

order

uecker|4 months ago

It still makes it possible to have bounds checking. (And it is also not true anymore for C2Y.)

pjmlp|4 months ago

Except it is more obvious what is the intention, it is about clarity to the reader.

1718627440|4 months ago

My point was indeed, that if you don't use pointer arithmetic in C, that means that you don't use arrays. I mean when you declare arrays of a fixed size, you can also declare an equivalent number of primitive variables instead, but I would find that inconvenient. Hence the question.