Is it safe to increment the ptr of a slice?

Can we safely increment the ptr of a slice, when the length stays the same?

Can’t see why it wouldn’t be, as long as you make sure that it’s still pointing to valid memory after the fact.

it’s sketchy if the length is staying the same, that requires certainty that the slice is a sub-slice to a larger region of memory which your logic wont escape.

The safest would be to always subtract the length by the same amount you are incrementing the pointer.

That it is. imaging line blending.