*T and [*]T values can't be coerced into each other, but they can be operated with the subtract operator. Intended?

how is that more valid than saying usize should coerce to [*]T because you can do ptr arithmetic with usize?

because that is literally what your bypass is;
ps - pm produces a usize, which you are then adding to pm.

ps - pm is certainly useful, if ps is a pointer to an element within pm, then ps - pm will give you its index.

pm + n is useful, it is literally just indexing, whether zig should have multiple ways to index is a different discussion.

This whole thing is just the result of [*]T not having bounds, which lets you access arbitrary memory.
This is not at all an argument for allowing *T -> [*]T coercion.

2 Likes