Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Those operators aren't for pointer arithmetic…

That's the point of my suggestion! One looking at them will think they are pointer arithmetic, which is not pretty for newcomers.



Those operators aren't for pointer arithmetic in any language I know of, including Rust, C, C++, or Go. The operators for pointer arithmetic are plus and minus (technically square brackets too in C)--that's why it's called pointer arithmetic.


Ok sorry, I misused the term "pointer arithmetic" then. I think I was referring to memory indirection and the like. I find "ref" and "->" less cryptic than "&" and "*".


You can have pointers and memory indirection without being able to do arithmetic on pointers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: