I'm new to the Carbon language, how to perform pointer arithmetic? Is this even possible?
p = p + 1;
=>
COMPILATION ERROR: <source>:11: type error in `+`:
could not find implementation of interface AddWith(U = i32) for i32*
Compiler returned: 1
Carbon does not support pointer arithmetic. The only two operations are
*p
gives the l-value p points to),&v
gives the address of l-value v
).More detail is available in carbon design notes.