News for hackers. Stuff that matters.
Re:Systemd is bad parsing by vmchale on Saturday October 27, 2018 @11:04AM (#18316003)
Funnily enough, ATS has pointer arithmetic and it can be safe if you declare the appropriate types.

It seems kind of nuts to say array indexing isn't just a fancier version of pointer arithmetic.

Re:Systemd is bad parsing by thwd on Saturday October 27, 2018 @11:16AM (#18316076)
Array-indexing in C and C++ _is_ pointer arithmetic! It's syntactic sugar. Array-indexing in safe languages is bound checked iff the compiler can't prove the index value to always be in-bounds.
Re:Systemd is bad parsing by mikeash on Saturday October 27, 2018 @01:55PM (#18316860)
In case anyone doesn’t already know, this isn’t a figure of speech. array[5] literally translates to *(array + 5) in C. Since + is a symmetric operator, that means 5[array] is a valid, equivalent expression.
Re:Systemd is bad parsing by zzzcpan on Saturday October 27, 2018 @11:12AM (#18316051)
Array indexing is __bounds checked__ pointer arithmetic.

But not in C.

Re:Systemd is bad parsing by xtrapolate on Saturday October 27, 2018 @11:09AM (#18316036)
> It seems kind of nuts to say array indexing isn't just a fancier version of pointer arithmetic.

I agree.